felipe                                   Thu, 12 Nov 2009 23:18:04 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290642

Log:
- Fixed bug #49734 (toString must return string value)

Bug: http://bugs.php.net/49734 (Open) toString must return string value
      
Changed paths:
    U   php/php-src/trunk/Zend/zend_object_handlers.c

Modified: php/php-src/trunk/Zend/zend_object_handlers.c
===================================================================
--- php/php-src/trunk/Zend/zend_object_handlers.c       2009-11-12 22:57:39 UTC 
(rev 290641)
+++ php/php-src/trunk/Zend/zend_object_handlers.c       2009-11-12 23:18:04 UTC 
(rev 290642)
@@ -1253,7 +1253,7 @@
                                        zend_error(E_ERROR, "Method 
%v::__toString() must not throw an exception", ce->name);
                        return FAILURE;
                 }
-                               if (Z_TYPE_P(retval) == IS_UNICODE) {
+                               if (Z_TYPE_P(retval) == IS_UNICODE || 
Z_TYPE_P(retval) == IS_STRING) {
                                        INIT_PZVAL(writeobj);
                                        if (readobj == writeobj) {
                                                zval_dtor(readobj);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to