ilnli Posted July 20, 2011 Share Posted July 20, 2011 I'm running a script which uses zend frameword, but it show me a blank page and I keep on getting this error: [Thu Jul 21 00:28:45 2011] [error] [client 86.8.113.177] PHP Fatal error: Cannot override final method Exception::__clone() in /var/www/vhosts/mailmegafiles.com/httpdocs/lib/Zend/Translate/Exception.php on line 35 Quote Link to comment https://forums.phpfreaks.com/topic/242494-zend-framework-cannot-override-final-method-exception/ Share on other sites More sharing options...
ilnli Posted July 21, 2011 Author Share Posted July 21, 2011 Can anyone please help? I'll really appreciate that. Quote Link to comment https://forums.phpfreaks.com/topic/242494-zend-framework-cannot-override-final-method-exception/#findComment-1245521 Share on other sites More sharing options...
trq Posted July 21, 2011 Share Posted July 21, 2011 The error is pretty self explanitory. It looks however like the error is actually in the Exception.php file which is odd. Has this Zend istall been hacked on much? What is on and around lines 35? Quote Link to comment https://forums.phpfreaks.com/topic/242494-zend-framework-cannot-override-final-method-exception/#findComment-1245571 Share on other sites More sharing options...
ilnli Posted July 21, 2011 Author Share Posted July 21, 2011 This is a new install so I don't think it's hacked, following is on line 35: 35 class Zend_Translate_Exception extends Zend_Exception 36 { 37 } Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/242494-zend-framework-cannot-override-final-method-exception/#findComment-1245688 Share on other sites More sharing options...
thehippy Posted July 22, 2011 Share Posted July 22, 2011 Zend_Exception extends SPL Exception, where cloning is finalized, if your application is trying to override it you'll get such an error. class My_Exception extends Zend_Translate_Exception { private function __clone() { // will not work } } The PHP error is just pointing out this fact, you're going to have to hunt down the real problem where someone is doing something wrong. Nothing is wrong with Zend its just being misused. Quote Link to comment https://forums.phpfreaks.com/topic/242494-zend-framework-cannot-override-final-method-exception/#findComment-1245979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.