First this is not a Zend Framework issue. It is about core PHP.
It is an E_STRICT
warning which may be enabled in your error_reporting
ini settings if you are using PHP <= 5.3. But as of PHP 5.4 that error mode changed to E_WARNING
. You should not disable E_WARNING
warnings for the development environment.
So when are you getting that warning? You are getting this while you are trying to use an object which has not defined. Therefore, you have to define that object first, you should then use that property.
In ZF, you have ViewModel()
object which has property overloading feature. To get rid of this warning you would use $title
thus
public function viewAction()
{
$view = new ViewModel();
$view->title = "View Album";
return $view;
}
And in your view script
<?php echo $this->title; ?>
For more details you may check out this problem and answer