cvs: ZendEngine2 / zend_object_handlers.c
| From: | Moriyoshi Koizumi | Date: | Tue, 04 Nov 2003 17:34:56 +0000 |
| Subject: | cvs: ZendEngine2 / zend_object_handlers.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1957@lists.php.net to get a copy of this message | ||
moriyoshi Tue Nov 4 12:34:56 2003 EDT
Modified files:
/ZendEngine2 zend_object_handlers.c
Log:
__tostring() handler should be binary-safe
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.71 ZendEngine2/zend_object_handlers.c:1.72
--- ZendEngine2/zend_object_handlers.c:1.71 Sun Oct 5 04:27:31 2003
+++ ZendEngine2/zend_object_handlers.c Tue Nov 4 12:34:56 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.71 2003/10/05 08:27:31 zeev Exp $ */
+/* $Id: zend_object_handlers.c,v 1.72 2003/11/04 17:34:56 moriyoshi Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -872,8 +872,7 @@
if (Z_TYPE_P(retval) != IS_STRING) {
zend_error(E_ERROR, "Method %s::__toString() must return a string value",
Z_OBJCE_P(readobj)->name);
}
- ZVAL_STRING(writeobj, Z_STRVAL_P(retval), 1);
- zval_ptr_dtor(&retval);
+ REPLACE_ZVAL_VALUE(&writeobj, retval, 0);
return SUCCESS;
}
break;