cvs: php4 /pear/XML Parser.php
| From: | Thomas V.V.Cox | Date: | Fri, 05 Oct 2001 17:47:07 +0000 |
| Subject: | cvs: php4 /pear/XML Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-935@lists.php.net to get a copy of this message | ||
cox Fri Oct 5 13:47:07 2001 EDT
Modified files:
/php4/pear/XML Parser.php
Log:
use the new PEAR::phpVersionIs() for better version checking
Index: php4/pear/XML/Parser.php
diff -u php4/pear/XML/Parser.php:1.17 php4/pear/XML/Parser.php:1.18
--- php4/pear/XML/Parser.php:1.17 Mon Sep 17 09:55:31 2001
+++ php4/pear/XML/Parser.php Fri Oct 5 13:47:07 2001
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Parser.php,v 1.17 2001/09/17 13:55:31 cox Exp $
+// $Id: Parser.php,v 1.18 2001/10/05 17:47:07 cox Exp $
require_once "PEAR.php";
@@ -145,13 +145,10 @@
case "func":
// use call_user_func() when php >= 4.0.7
// or call_user_method() if not
- // XXXX add the php version comparing code to PEAR.php?
- list($v, ) = explode('-', PHP_VERSION); // 4.0.7-dev
- list($php_ver, $php_rel, $php_patch) = explode('.', $v);
- if ($php_ver >= 4 && ($php_rel > 0 || $php_patch >= 7)) {
- $this->use_call_user_func = true;
- } else {
+ if (PEAR::phpVersionIs('4.0.7')) {
$this->use_call_user_func = false;
+ } else {
+ $this->use_call_user_func = true;
}
xml_set_element_handler($this->parser, "funcStartHandler",
"funcEndHandler");