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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 03:01:31 2024 UTC