Ask a Question related to PHP Bugs, Design and Development.
-
tony2001@php.net #1
#40159 [Opn->Fbk]: Cannot access protected property
ID: 40159
Updated by: [email]tony2001@php.net[/email]
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 [url]http://bugs.php.net/?id=40159&edit=1[/url]
tony2001@php.net Guest
-
#40159 [NEW]: Cannot access protected property
From: dominik dot bulaj at gmail dot com Operating system: Debian PHP version: 5.2.0 PHP Bug Type: Class/Object related Bug... -
#29234 [Com]: empty($object->property) incorrect when property has access overloaded (__get)
ID: 29234 Comment by: phpbugs at thunder-2000 dot com Reported By: chrissy at codegoat dot com Status: No... -
Access password protected data
Hi, I would like to access XML data from a third party server. Unfortunately the URL is password protected (simple web server, directory based... -
How to make a protected property in the base component public in the derived component?
I have a base component, from which several components derive. What I want is to just publish some of the protected properties in the base... -
Unable to access the Web Service in a RSA secured/protected environment
Hi all, I am working on MS .NET Alerts to be implemented at our site. We have our web applications in ASP 3.0 I have created a local web service...



Reply With Quote

