cvs: php-src /pear/PEAR Common.php
| From: | Pierre-Alain Joye | Date: | Sun, 16 May 2004 20:55:29 +0000 |
| Subject: | cvs: php-src /pear/PEAR Common.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-326@lists.php.net to get a copy of this message | ||
pajoye Sun May 16 16:55:29 2004 EDT
Modified files:
/php-src/pear/PEAR Common.php
Log:
- PHP allows spaces before :: (parent :: foo(); )
Nota bene, requires another change to really check the syntax:
loop back to the first non white space element and valid it (parent,
string or var)
http://cvs.php.net/diff.php/php-src/pear/PEAR/Common.php?r1=1.122&r2=1.123&ty=u
Index: php-src/pear/PEAR/Common.php
diff -u php-src/pear/PEAR/Common.php:1.122 php-src/pear/PEAR/Common.php:1.123
--- php-src/pear/PEAR/Common.php:1.122 Thu Apr 29 22:05:45 2004
+++ php-src/pear/PEAR/Common.php Sun May 16 16:55:29 2004
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.122 2004/04/30 02:05:45 cellog Exp $
+// $Id: Common.php,v 1.123 2004/05/16 20:55:29 pajoye Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -1407,7 +1407,7 @@
}
continue 2;
case T_DOUBLE_COLON:
- if ($tokens[$i - 1][0] != T_STRING) {
+ if (!($tokens[$i - 1][0] == T_STRING || $tokens[$i - 1][0] == T_STRING)) {
PEAR::raiseError("Parser error: Invalid PHP file $file",
PEAR_COMMON_ERROR_INVALIDPHP);
return false;