From: Andrew Dolgov Date: Tue, 5 Jun 2007 10:32:53 +0000 (+0100) Subject: check PHP version before trying to use DOMDocument X-Git-Tag: 1.2.12~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5eb66ed7d983c820a51e3f2ccb284063975a62e6;p=tt-rss.git check PHP version before trying to use DOMDocument --- diff --git a/opml.php b/opml.php index 701d8396..8d3f8d62 100644 --- a/opml.php +++ b/opml.php @@ -110,10 +110,12 @@ print "

".__("Importing OPML (using DOMXML extension)...")."

"; require_once "modules/opml_domxml.php"; opml_import_domxml($link, $owner_uid); - } else { + } else if (PHP_VERSION >= 5) { print "

".__("Importing OPML (using DOMDocument extension)...")."

"; require_once "modules/opml_domdoc.php"; opml_import_domdoc($link, $owner_uid); + } else { + print_error(__("DOMXML extension is not found. It is required for PHP versions below 5.")); } print "