|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59581 A child class of OAuth cannot access its own attributes
Submitted: 2011-01-15 06:14 UTC Modified: 2011-02-17 21:18 UTC
From: sb at sebastian-bergmann dot de Assigned:
Status: Closed Package: oauth (PECL)
PHP Version: Trunk SVN-2011-01-15 (dev) OS: Irrelevant
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:
Bug Type:
From: sb at sebastian-bergmann dot de
New email:
PHP Version: OS:


 [2011-01-15 06:14 UTC] sb at sebastian-bergmann dot de
A notice is triggered when a child class of OAuth accesses its own attributes.

Reproduce code:
class Foo extends OAuth
    protected $foo = 'bar';

    public function getFoo()
        return $this->foo;

$foo = new Foo('key', 'secret');

Expected result:
string(3) "bar"

Actual result:
sb@vmware ~ % php Foo.php 

Notice: Undefined property: Foo::$foo in /home/sb/Foo.php on line 8

Call Stack:
    0.0003     680784   1. {main}() /home/sb/Foo.php:0
    0.0005     685608   2. Foo->getFoo() /home/sb/Foo.php:13



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-15 11:50 UTC]
Thanks for the bug report. I'll look at getting this resolved 
in the next release.

- JJ
 [2011-01-15 19:44 UTC]
This bug has been fixed in SVN.

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

In case this was a 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.

 [2011-02-17 21:18 UTC]
Test case fails for 5.2.14 (tested on trunk)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 15:01:28 2024 UTC