-- Mauro Casula <[EMAIL PROTECTED]> wrote (on Wednesday, 28 February 2007, 12:09 PM -0800): > i'm trying to update my web-application developed with the Zend Framework > 0.6 to 0.8. > > I have successfully changed my code following the migration guide: > http://framework.zend.com/manual/en/zend.controller.migration.html#zend.controller.migration.fromzerosix > http://framework.zend.com/manual/en/zend.controller.migration.html#zend.controller.migration.fromzerosix > > > All seems to run well, but the Zend_View. > > In many pages where I have code like: > <?php echo $this->error; ?> > In the page is displayed a message like: > <br />Notice: Undefined property: Zend_View::$error in > C:\Progetti\workspacePHP\tuttosanta\app\views\contatti\contattaci.php on > line 34<br /> > > I have not valorized this variable in the controller, but I dont undestand > why the Notice is displayed... > > Can anyone help me...?
Because the property has not been defined. In earlier versions of Zend_View, we used __get(). However, since there are issues with some value types when used with __get(), __set() now sets a public property, which has eliminated the need for __get(). On the other hand, this means that simply using a construct like <?= $this->error ?> when the $this->error has not yet been defined will throw a notice. I may know a way to work around this; could you place an issue in the tracker regarding this? (If you do not have posting privileges, let me know, and I'll place it for you.) -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
