]> granicus.if.org Git - php/commitdiff
- PHP allows spaces before :: (parent :: foo(); )
authorPierre Joye <pajoye@php.net>
Sun, 16 May 2004 20:55:29 +0000 (20:55 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 16 May 2004 20:55:29 +0000 (20:55 +0000)
  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)

pear/PEAR/Common.php

index 6e11a0d0276f8429c6de75a298af5b7924faf10d..edaf4c2104944b18a7324df01860f3a2a3b37774 100644 (file)
@@ -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;