php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58736 child classes of HttpMessage cannot not have array properties
Submitted: 2009-06-23 18:27 UTC Modified: 2009-07-22 06:25 UTC
From: jeffhodsdon at gmail dot com Assigned: mike (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5.2.9 OS: debian
Private report: No CVE-ID: None
 [2009-06-23 18:27 UTC] jeffhodsdon at gmail dot com
Description:
------------
When extending HttpMessage and having an array property I run 
into "PHP Fatal error:  Cannot access HttpMessage properties 
by reference or array key/index"

Reproduce code:
---------------
<?php

class ChildMessage extends HttpMessage
{

    public $properties = array();

}

$child = new ChildMessage;
$child->properties['foo'] = 'bar';

?>


Expected result:
----------------
ChildMessage::$properties['foo'] to equal 'bar'

Actual result:
--------------
PHP Fatal error:  Cannot access HttpMessage properties by 
reference or array key/index in /home/hodsdon/bug.php on line 
11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-22 06:25 UTC] mike@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC