check PHP version before trying to use DOMDocument
This commit is contained in:
parent
1b1b8a7b84
commit
5eb66ed7d9
1 changed files with 3 additions and 1 deletions
4
opml.php
4
opml.php
|
@ -110,10 +110,12 @@
|
||||||
print "<p>".__("Importing OPML (using DOMXML extension)...")."</p>";
|
print "<p>".__("Importing OPML (using DOMXML extension)...")."</p>";
|
||||||
require_once "modules/opml_domxml.php";
|
require_once "modules/opml_domxml.php";
|
||||||
opml_import_domxml($link, $owner_uid);
|
opml_import_domxml($link, $owner_uid);
|
||||||
} else {
|
} else if (PHP_VERSION >= 5) {
|
||||||
print "<p>".__("Importing OPML (using DOMDocument extension)...")."</p>";
|
print "<p>".__("Importing OPML (using DOMDocument extension)...")."</p>";
|
||||||
require_once "modules/opml_domdoc.php";
|
require_once "modules/opml_domdoc.php";
|
||||||
opml_import_domdoc($link, $owner_uid);
|
opml_import_domdoc($link, $owner_uid);
|
||||||
|
} else {
|
||||||
|
print_error(__("DOMXML extension is not found. It is required for PHP versions below 5."));
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br><form method=\"GET\" action=\"prefs.php\">
|
print "<br><form method=\"GET\" action=\"prefs.php\">
|
||||||
|
|
Loading…
Reference in a new issue