Mantis - Quercus
Viewing Issue Advanced Details
3608 major always 07-24-09 03:38 07-24-09 03:38
tlandmann  
 
normal  
new 4.0.0  
open  
none    
none  
0003608: "private" access level ignored
The example program below (also attached as a file for your convenience) outputs the following in standard PHP 5.2.6:

doing 1_a
doing 1_b

..., which is the expected result.

-----------------

In Quercus it prints:

doing 2_a
/var/www/htdocs_selbst_branch_v2/test.php:8: Warning: required argument missing
doing 2_b

..., which means that Quercus ignores the "private" access (security issue!) and that my nice framework with a well-designed hierarchy of decorator classes currently doesn't work in Quercus.


======================================
Sourcecode:
--------------------------------------

class class_1
{
    public function do_something_1()
    {
        $this->do_it_a('dummy');
        $this->do_it_b('dummy');
    }
    
    private function do_it_a($param)
    {
        echo "doing 1_a\n";
    }
    
    private function do_it_b($param)
    {
        echo "doing 1_b\n";
    }
}

class class_2 extends class_1
{
    private function do_it_a($param)
    {
        echo "doing 2_a\n";
    }
    
    private function do_it_b($param1, $param2)
    {
        echo "doing 2_b\n";
    }
}

$object=new class_2;
$object->do_something_1();
 quercus_private_access_level_bug.php [^] (507 bytes) 07-24-09 03:38

There are no notes attached to this issue.