accessing variables within objects
| From: | Marten Lehmann | Date: | Wed, 30 Jul 2008 18:10:54 +0000 |
| Subject: | accessing variables within objects | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-277493@lists.php.net to get a copy of this message | ||
Hello,
I'm using some php-classes which worked fine with php-5.0.4. Now I tried to upgrade to php-5.2.6, but the classes give a lot of errors. If I set
error_reporting(E_ALL);
I see messages like
Notice: Undefined property: FastTemplate::$main in /whereever/inc.template.php on line 293
Notice: Undefined property: current_session::$cust_id in /whereever/inc.init.php on line 117
In inc.template.php there are a lot of calls like $this->$key. In inc.init.php there are calls like $session->cust_id.
What has changed in php-5.2.x so that these calls don't work any more? What is the new, required form to use objects in a similar manner (unfortunately I have no ressources to code these classes from scratch)? Thanks.
Kind regards
Marten