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 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: 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

Add a Patch

Pull Requests

Add a Pull Request

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: Sat Apr 20 02:01:29 2024 UTC