Mantis - Quercus
Viewing Issue Advanced Details
1145 major always 05-25-06 09:33 05-30-06 09:25
koreth  
ferg  
normal  
closed 3.0.20  
fixed  
none    
none 3.0.20  
0001145: Can't call static method from static method using "self::" notation
PHP:

<?php
class testclass {
        public static function func1() {
                self::func2();
        }
        protected static function func2() {
                print "Hi";
        }
}

testclass::func1();
?>

This prints "Hi" on Zend PHP and fails to compile under Quercus. Same error as bug 1099 (which is fixed):

com.caucho.java.JavaCompileException: /Users/sgrimm/resin/resin/webapps/test/WEB-INF/work/_quercus/_test__php.java:86: cannot find symbol
symbol : variable q_this
location: class _quercus._test__php.quercus_testclass
      env.getClass("testclass").getFunction("func2").evalMethod(env, q_this);
                                                                     ^
1 error
060522 snapshot

Notes
(0001247)
ferg   
05-30-06 09:25   
php/3969