#29327 [Opn->Bgs]: Implicit cloning error
| From: | derick@php.net | Date: | Mon, 02 Aug 2004 09:05:31 +0000 |
| Subject: | #29327 [Opn->Bgs]: Implicit cloning error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63895@lists.php.net to get a copy of this message | ||
ID: 29327
Updated by: derick@php.net
Reported By: jules at infinityblue dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows 2000 Server
PHP Version: 5.0.0
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Please read the docs. The error handler receives all types of errors
even if you don't have them in your error reporting setting.
Previous Comments:
------------------------------------------------------------------------
[2004-07-22 13:24:28] jules at infinityblue dot com
Description:
------------
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
I'm loading an error handler. It immediatly trips of the error hander
with the above error. This code works on PHP 4.2.4.
The following changes were made to the php.ini (taken from
php.ini-recommended) for PHP 5:
zend.ze1_compatibility_mode = On
display_errors = on
error_reporting = E_ALL
extension=php_mysql.dll
extension_dir = "ext/"
Server is running on Apache 1.3.29. No segmentation faults have been
noted in the logs
Reproduce code:
---------------
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');
}
}
?>
Expected result:
----------------
I expect the class to be loaded and the erro handler to be working
*without* echoing the contents of:
echo "The error message: $mErrorMessage<br>";
Actual result:
--------------
The error message: PHP ERROR : , ERROR CODE: 2048, MESSAGE: Implicit
cloning object of class 'testErrors' because of
'zend.ze1_compatibility_mode', FILE:
c:\eclipse\workspace\sitemanager\infinityadmin\index_test.php, LINE: 6
Error handler is set off with the above error message. But in theory no
error should have been caused.
This error is also error code 2048. This is surely E_STRICT error
reporting, however, php.ini is set to E_ALL.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29327&edit=1