Hello all, I have a small issue with a PHP 4 developed application on PHP5. Current I get the following error message:
PHP ERROR : , ERROR CODE: 2048, MESSAGE: Implicit cloning object of class 'testErrors' because of 'zend.ze1_compatibility_mode', FILE: c:\eclipse\workspace\myapp\index_test.php, LINE: 6 The first file index_test.php looks as follows: <? if (!class_exists('testErrors')) include "testErrors.php"; $cErrorHandler = new testErrors(); ?> And testErrors.php looks like: <? class testErrors { function testErrors() { function HandleError($number, $message, $file, $line) { global $iErrorsShow, $iLogErrors; $mErrorMessage = 'PHP ERROR : '; $mErrorMessage .= ', ERROR CODE: ' . $number; $mErrorMessage .= ', MESSAGE: ' . $message; $mErrorMessage .= ', FILE: ' . $file; $mErrorMessage .= ', LINE: ' . $line; echo "The error message: $mErrorMessage<br>"; } // declare the above function to handle all PHP errors set_error_handler('HandleError'); } } ?> This is, of course, a stripped down version. It should handle the error in a nice way. However, on PHP 5 it won't run. I have the made the following changes to the PHP settings: zend.ze1_compatibility_mode = On error_reporting = E_ALL display_errors = On Now, the error code is 2048 which is the new strict level (?) However, as you can see I have it on E_ALL and not strict, so why is it even triggering the error??? Maybe I'm doing something wrong but I get it in all cases where I declare a class in the PHP4 manner. Any help would be great, Thanks, Jules... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php