cvs: ZendEngine2(PHP_5_0) / zend_API.c /tests bug30332.phpt php-src NEWS
| From: | Dmitry Stogov | Date: | Fri, 29 Apr 2005 07:58:51 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_API.c /tests bug30332.phpt php-src NEWS | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3615@lists.php.net to get a copy of this message | ||
dmitry Fri Apr 29 03:58:51 2005 EDT
Added files: (Branch: PHP_5_0)
/ZendEngine2/tests bug30332.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_API.c
Log:
Fixed bug #30332 (zend.ze1_compatibility_mode isnt fully compatable with array_push())
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.360&r2=1.1760.2.361&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.360 php-src/NEWS:1.1760.2.361
--- php-src/NEWS:1.1760.2.360 Fri Apr 29 03:03:33 2005
+++ php-src/NEWS Fri Apr 29 03:58:48 2005
@@ -68,6 +68,8 @@
- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
- Fixed bug #30702 (cannot initialize class variable from class constant).
(Dmitry)
+- Fixed bug #30332 (zend.ze1_compatibility_mode isnt fully compatable with
+ array_push()). (Dmitry)
- Fixed bug #29944 (Function defined in switch, crashes). (Dmitry)
- Fixed bug #29583 (crash when echoing a COM object). (M.Sisolak, Wez)
- Fixed bug #29210 (Function: is_callable - no support for private and
http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.256.2.13&r2=1.256.2.14&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.256.2.13 ZendEngine2/zend_API.c:1.256.2.14
--- ZendEngine2/zend_API.c:1.256.2.13 Wed Apr 27 11:44:06 2005
+++ ZendEngine2/zend_API.c Fri Apr 29 03:58:50 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.256.2.13 2005/04/27 15:44:06 dmitry Exp $ */
+/* $Id: zend_API.c,v 1.256.2.14 2005/04/29 07:58:50 dmitry Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -152,7 +152,21 @@
}
while (param_count-->0) {
- *(argument_array++) = (zval **) p-(arg_count--);
+ zval **value = (zval**)(p-arg_count);
+
+ if (EG(ze1_compatibility_mode) && Z_TYPE_PP(value) == IS_OBJECT) {
+ zval *value_ptr;
+
+ ALLOC_ZVAL(value_ptr);
+ *value_ptr = **value;
+ INIT_PZVAL(value_ptr);
+ zend_error(E_STRICT, "Implicit cloning object of class '%s' because of
'zend.ze1_compatibility_mode'", Z_OBJCE_PP(value)->name);
+ value_ptr->value.obj = Z_OBJ_HANDLER_PP(value, clone_obj)(*value TSRMLS_CC);
+ zval_ptr_dtor(value);
+ *value = value_ptr;
+ }
+ *(argument_array++) = value;
+ arg_count--;
}
return SUCCESS;
http://cvs.php.net/co.php/ZendEngine2/tests/bug30332.phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug30332.phpt
+++ ZendEngine2/tests/bug30332.phpt