From: Pierre Joye Date: Sun, 16 May 2004 20:55:29 +0000 (+0000) Subject: - PHP allows spaces before :: (parent :: foo(); ) X-Git-Tag: RELEASE_0_1~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a937ae4762aed0d6a48b226082a997416c93a273;p=php - 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) --- diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index 6e11a0d027..edaf4c2104 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -1407,7 +1407,7 @@ class PEAR_Common extends PEAR } 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;