php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57107 Fatal error: Cannot access protected property ...
Submitted: 2006-06-23 10:57 UTC Modified: 2006-08-29 06:29 UTC
From: soporte at onfocus dot cl Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2 OS: Linux 64 bit
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: soporte at onfocus dot cl
New email:
PHP Version: OS:

 

 [2006-06-23 10:57 UTC] soporte at onfocus dot cl
Description:
------------
there is a bug somewhere, the following applications I tested    triggers the problem

1. Flux CMS
2. Cowiki



Reproduce code:
---------------
foo.php

<?php
require_once 'bar.php';

$bar = new Bar();
$bar->assign("foo", "bar");
?>

bar.php

<?php

class Bar {

    protected $aAssign  = array();

    public function assign($sTag, $sContent) {
        $this->aAssign[$sTag] = $sContent;
    }
}



Expected result:
----------------
business as usual.

Actual result:
--------------
at the first call, code processed correctly, at the second call. 

Fatal error: Cannot access protected property Bar::$aAssign in bar.php on line 10


in using latest APC CVS, and PHP 5_2 CVS.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-07 05:42 UTC] gopalv82 at yahoo dot com
APC cvs is *NOT* ported to 5_2 branch.
 [2006-08-29 06:29 UTC] gopalv82 at yahoo dot com
The 5.2 compatibility fixes are in.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 23:01:33 2025 UTC