cvs: ZendEngine2 / zend_exceptions.c /tests exception_009.phpt

From: Date: Thu, 14 Aug 2008 19:11:42 +0000
Subject: cvs: ZendEngine2 / zend_exceptions.c /tests exception_009.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-7051@lists.php.net to get a copy of this message
felipe Thu Aug 14 19:11:42 2008 UTC Added files: /ZendEngine2/tests exception_009.phpt Modified files: /ZendEngine2 zend_exceptions.c Log: - Fixed crash (reported by Lupus Michaelis) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_exceptions.c?r1=1.125&r2=1.126&diff_format=u Index: ZendEngine2/zend_exceptions.c diff -u ZendEngine2/zend_exceptions.c:1.125 ZendEngine2/zend_exceptions.c:1.126 --- ZendEngine2/zend_exceptions.c:1.125 Thu Aug 14 10:06:39 2008 +++ ZendEngine2/zend_exceptions.c Thu Aug 14 19:11:42 2008 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_exceptions.c,v 1.125 2008/08/14 10:06:39 helly Exp $ */ +/* $Id: zend_exceptions.c,v 1.126 2008/08/14 19:11:42 felipe Exp $ */ #include "zend.h" #include "zend_API.h" @@ -621,7 +621,9 @@ _default_exception_get_entry(exception, "file", sizeof("file")-1, &file TSRMLS_CC); _default_exception_get_entry(exception, "line", sizeof("line")-1, &line TSRMLS_CC); - convert_to_long(&line); + convert_to_unicode(&message); + convert_to_unicode(&file); + convert_to_long(&line); fci.size = sizeof(fci); fci.function_table = &Z_OBJCE_P(getThis())->function_table; http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/exception_009.phpt?view=markup&rev=1.1 Index: ZendEngine2/tests/exception_009.phpt +++ ZendEngine2/tests/exception_009.phpt --TEST-- Testing exception properties --FILE-- <?php class my_file { public function __toString() { return "somebuildfilename" ; } } class my_exception extends exception { public function __construct() { $this->message = new stdclass ; $this->file = new my_file ; $this->line = "12" ; } } throw new my_exception; ?> --EXPECT-- Catchable fatal error: Object of class stdClass could not be converted to Unicode string in Unknown on line 0

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