cvs: ZendEngine2 / zend_object_handlers.c

From: Date: Thu, 06 Oct 2005 19:11:01 +0000
Subject: cvs: ZendEngine2 / zend_object_handlers.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4211@lists.php.net to get a copy of this message
helly Thu Oct 6 15:11:01 2005 EDT Modified files: /ZendEngine2 zend_object_handlers.c Log: - BC: php objects convert to int/double 1 with notice http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.149&r2=1.150&ty=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.149 ZendEngine2/zend_object_handlers.c:1.150 --- ZendEngine2/zend_object_handlers.c:1.149 Thu Oct 6 14:46:01 2005 +++ ZendEngine2/zend_object_handlers.c Thu Oct 6 15:11:01 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.149 2005/10/06 18:46:01 helly Exp $ */ +/* $Id: zend_object_handlers.c,v 1.150 2005/10/06 19:11:01 helly Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -1042,6 +1042,18 @@ INIT_PZVAL(writeobj); ZVAL_BOOL(writeobj, 1); return SUCCESS; + case IS_LONG: + ce = Z_OBJCE_P(readobj); + zend_error(E_NOTICE, "Object of class %v could not be converted to int", ce->name); + INIT_PZVAL(writeobj); + ZVAL_LONG(writeobj, 1); + return SUCCESS; + case IS_DOUBLE: + ce = Z_OBJCE_P(readobj); + zend_error(E_NOTICE, "Object of class %v could not be converted to double", ce->name); + INIT_PZVAL(writeobj); + ZVAL_DOUBLE(writeobj, 1); + return SUCCESS; default: break; }

« previous php.zend-engine.cvs (#4211) next »