ID: 40159
Updated by: [EMAIL PROTECTED]
Reported By: dominik dot bulaj at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Debian
PHP Version: 5.2.0
New Comment:
Cannot reproduce.
Previous Comments:
------------------------------------------------------------------------
[2007-01-18 11:20:19] dominik dot bulaj at gmail dot com
Description:
------------
I got 3 classes:
abstract class BlogApi
{
protected $blogUrl = false;
// other properties
public function setup($blogUrl, $username, $password, $blogId = 1)
{
$this->blogUrl = $blogUrl;
$this->username = $username;
$this->password = $password;
$this->blogId = $blogId;
return $this;
}
// rest of methods
}
abstract class BloggerApi extends BlogApi
{
// some methods specyfic for BloggerApi
}
class WordPress extends BloggerApi
{
// some methods
public function publish()
{
return $this->publishToBlog(rtrim($this->blogUrl,
'/').'/xmlrpc.php');
}
}
Now when I start with:
$wp = new WordPress;
$wp->setup('some_url', 'usr_name', 'pwd', 1);
// another method to set-up post subject & body
$wp->publish();
I got error:
Fatal error: Cannot access protected property WordPress::$blogUrl in
....
Strange is, that code worked well in PHP 5.1.6-5 on Debian.
Actual result:
--------------
Fatal error: Cannot access protected property WordPress::$blogUrl in
...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40159&edit=1