[Ilugc] php + zend error
- From: gurukumara@xxxxxxxxx (Kumara Guru)
- Date: Sat, 10 Sep 2011 06:58:14 +0530
On Fri, Sep 9, 2011 at 5:43 PM, Usha Subramanian
<usha.subramanian88 at gmail.com> wrote:
Hi anyone could shed light on overcomming the following error:
My php version is PHP 5.3.2 (cli)
Warning: The magic method __isset() must have public visibility and cannot
be static in
/home/COMOCHENNAI/usha/projects/vinnies/application/libraries/Zend/Config.php
on line 182 Warning: The magic method __unset() must have public visibility
and cannot be static in
/home/COMOCHENNAI/usha/projects/vinnies/application/libraries/Zend/Config.php
on line 194
Thanks.,
Usha
In PHP 5, all overloading methods must be defined as *public* but PHP
versions prior to 5.3 didn't really make a fuss if you defined your
overloading method as *protected*. The Config.php file in the version
of Zend framework you are using, overloads __isset , __unset methods
but defines them as protected. Starting in PHP 5.3, the public scope
requirement for overloading methods is being enforced by throwing a
warning like the ones you are reporting. This issue is fixed in Zend
Framework version 1.6 (see
http://framework.zend.com/issues/browse/ZF-3417). If you don't want to
turn off those warnings (using error_reporting() or php.ini), you
should upgrade to the latest version of Zend framework compatible with
your application.
Regards,
Kumaraguru
Other related posts: