php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sb at sebastian-bergmann dot de
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php
class Foo extends OAuth
{
    protected $foo = 'bar';

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

$foo = new Foo('key', 'secret');
var_dump($foo->getFoo());

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

NULL

Patches

Pull Requests

History

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

- JJ
 [2011-01-15 19:44 UTC] felipe@php.net
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 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.


 [2011-02-17 21:18 UTC] datibbaw@php.net
Test case fails for 5.2.14 (tested on trunk)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC