[PHP-CVS] com php-src: more test script for #62328: ext/spl/tests/bug62328.phpt
Commit:212cfb95d1c7eb7202e1386294808eceef386b78 Author:Xinchen Hui Mon, 13 Aug 2012 11:03:35 +0800 Parents: be818e7ea7a7627ab12faa70d9e70a85c823f738 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=212cfb95d1c7eb7202e1386294808eceef386b78 Log: more test script for #62328 Bugs: https://bugs.php.net/62328 Changed paths: A ext/spl/tests/bug62328.phpt Diff: diff --git a/ext/spl/tests/bug62328.phpt b/ext/spl/tests/bug62328.phpt new file mode 100644 index 000..33a8aee --- /dev/null +++ b/ext/spl/tests/bug62328.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #62328 (cast_object takes precedence over __toString) +--CREDITS-- +leight at gmail dot com +--FILE-- +__toString() . PHP_EOL; + +?> +--EXPECT-- +__toString +__toString -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: .gitattributes
Commit:d4f9bbfae248687c1aa68370564b14544eb4eafd Author:Xinchen Hui Sat, 11 Aug 2012 16:00:00 +0800 Parents: 5ae7540abd241a9d0453ce8a37637068140897a9 e1180b4f1aea83ee5dc7f62832a10056e0f62f18 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d4f9bbfae248687c1aa68370564b14544eb4eafd Log: Merge branch 'PHP-5.3' into PHP-5.4 Changed paths: MM .gitattributes Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #62795 (Zip extension version not defined): .gitattributes
Commit:e1180b4f1aea83ee5dc7f62832a10056e0f62f18 Author:Xinchen Hui Sat, 11 Aug 2012 15:59:06 +0800 Parents: 7130887719684cff57cb904a6f1b2de5016a00c8 Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e1180b4f1aea83ee5dc7f62832a10056e0f62f18 Log: Fixed bug #62795 (Zip extension version not defined) Bugs: https://bugs.php.net/62795 Changed paths: M .gitattributes Diff: diff --git a/.gitattributes b/.gitattributes index d53e569..862575b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,6 +15,7 @@ ext/dba/libflatfile/flatfile.c ident ext/dba/libcdb/cdb_make.c ident ext/dba/libcdb/cdb.cident ext/filter/filter.c ident +ext/zip/php_zip.c ident README.input_filter ident run-tests.php ident sapi/nsapi/nsapi.c ident -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "Test for bug 62328": Zend/tests/bug62328.phpt
Commit:32c1c5a19fab5c1471a5902a54efcd0875fe7e79 Author:Xinchen Hui Sun, 12 Aug 2012 12:02:02 +0800 Parents: d11fa44d626809f1160cafdaddd73d4c45516a2c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=32c1c5a19fab5c1471a5902a54efcd0875fe7e79 Log: Revert "Test for bug 62328" This reverts commit 222ab9da1aa086a47279d29c16a8ebea514257fe. Bugs: https://bugs.php.net/62328 Changed paths: D Zend/tests/bug62328.phpt Diff: diff --git a/Zend/tests/bug62328.phpt b/Zend/tests/bug62328.phpt deleted file mode 100644 index c56ddc2..000 --- a/Zend/tests/bug62328.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Bug #62328 (cast_object takes precedence over __toString) ---FILE-- -__toString() . PHP_EOL; - -?> ---EXPECT-- -__toString -__toString -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert "zend_make_printable_zval choses cast_object over __toString": Zend/zend.c
Commit:75f6c8d42cfcf856d7a12f67c3981f3ad62660e9 Author:Xinchen Hui Sun, 12 Aug 2012 12:02:06 +0800 Parents: 32c1c5a19fab5c1471a5902a54efcd0875fe7e79 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75f6c8d42cfcf856d7a12f67c3981f3ad62660e9 Log: Revert "zend_make_printable_zval choses cast_object over __toString" This reverts commit a5dfd414941953c282bb68f6b08685252ca93a1a. Changed paths: M Zend/zend.c Diff: diff --git a/Zend/zend.c b/Zend/zend.c index be30e92..18c4f11 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -258,12 +258,6 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop { TSRMLS_FETCH(); - if (Z_OBJCE_P(expr)->__tostring) { - if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - break; - } - } - if (Z_OBJ_HANDLER_P(expr, cast_object)) { zval *val; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS: NEWS
Commit:786670f53682c1e43f52c7642e6e47ed25f6708d Author:Xinchen Hui Sun, 12 Aug 2012 12:00:16 +0800 Parents: 7b307fb930e6cf328993dee4b060f6f823c39d24 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=786670f53682c1e43f52c7642e6e47ed25f6708d Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 6efc0df..236f8e5 100644 --- a/NEWS +++ b/NEWS @@ -3,8 +3,6 @@ PHP NEWS ?? ??? 2012, PHP 5.4.7 - Core: - . Fixed bug #62328 (implementing __toString and a cast to string fails) -(Laruence) . Fixed bug #62725 (Calling exit() in a shutdown function does not return the exit value). (Laruence) . Fixed bug #51363 (Fatal error raised by var_export() not caught by error @@ -12,6 +10,10 @@ PHP NEWS . Fixed bug #40459 (Stat and Dir stream wrapper methods do not call constructor). (Stas) +- SimpleXML: + . Fixed bug #62328 (implementing __toString and a cast to string fails) +(Laruence) + - PDO: . Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: zend_make_printable_zval choses cast_object over __toString: Zend/zend.c
Commit:a5dfd414941953c282bb68f6b08685252ca93a1a Author:Leigh Fri, 10 Aug 2012 11:09:25 +0100 Parents: 7e4c0125dac2167b13ff279d8213ee46be45d4c7 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a5dfd414941953c282bb68f6b08685252ca93a1a Log: zend_make_printable_zval choses cast_object over __toString https://bugs.php.net/bug.php?id=62328 Added a check to see if the object implements a __toString magic method. This should be called instead of the cast_object method of built-in classes when defined. Changed paths: M Zend/zend.c Diff: diff --git a/Zend/zend.c b/Zend/zend.c index 18c4f11..be30e92 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -258,6 +258,12 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop { TSRMLS_FETCH(); + if (Z_OBJCE_P(expr)->__tostring) { + if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) { + break; + } + } + if (Z_OBJ_HANDLER_P(expr, cast_object)) { zval *val; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #62328 (implementing __toString and a cast to string fails): NEWS Zend/zend.c ext/xml/tests/bug62328.phpt
Commit:7b307fb930e6cf328993dee4b060f6f823c39d24 Author:Xinchen Hui Sun, 12 Aug 2012 11:50:28 +0800 Parents: d4f9bbfae248687c1aa68370564b14544eb4eafd Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b307fb930e6cf328993dee4b060f6f823c39d24 Log: Fixed bug #62328 (implementing __toString and a cast to string fails) __toString should has a high priority Bugs: https://bugs.php.net/62328 Changed paths: M NEWS M Zend/zend.c A ext/xml/tests/bug62328.phpt Diff: diff --git a/NEWS b/NEWS index 60fe2b9..6efc0df 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2012, PHP 5.4.7 - Core: + . Fixed bug #62328 (implementing __toString and a cast to string fails) +(Laruence) . Fixed bug #62725 (Calling exit() in a shutdown function does not return the exit value). (Laruence) . Fixed bug #51363 (Fatal error raised by var_export() not caught by error diff --git a/Zend/zend.c b/Zend/zend.c index 18c4f11..09338e7 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -258,6 +258,9 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop { TSRMLS_FETCH(); + if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) { + break; + } if (Z_OBJ_HANDLER_P(expr, cast_object)) { zval *val; @@ -270,12 +273,6 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop } zval_ptr_dtor(&val); } - /* Standard PHP objects */ - if (Z_OBJ_HT_P(expr) == &std_object_handlers || !Z_OBJ_HANDLER_P(expr, cast_object)) { - if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) { - break; - } - } if (!Z_OBJ_HANDLER_P(expr, cast_object) && Z_OBJ_HANDLER_P(expr, get)) { zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC); diff --git a/ext/xml/tests/bug62328.phpt b/ext/xml/tests/bug62328.phpt new file mode 100644 index 000..e4c3c59 --- /dev/null +++ b/ext/xml/tests/bug62328.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #62328 (implementing __toString and a cast to string fails) +--SKIPIF-- + +--FILE-- +'); + +var_dump((string) $xml); +var_dump($xml->__toString()); +--EXPECT-- +string(15) "stringification" +string(15) "stringification" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Test for bug 62328: Zend/tests/bug62328.phpt
Commit:222ab9da1aa086a47279d29c16a8ebea514257fe Author:Leigh Fri, 10 Aug 2012 11:43:53 +0100 Parents: a5dfd414941953c282bb68f6b08685252ca93a1a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=222ab9da1aa086a47279d29c16a8ebea514257fe Log: Test for bug 62328 Bugs: https://bugs.php.net/62328 Changed paths: A Zend/tests/bug62328.phpt Diff: diff --git a/Zend/tests/bug62328.phpt b/Zend/tests/bug62328.phpt new file mode 100644 index 000..c56ddc2 --- /dev/null +++ b/Zend/tests/bug62328.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #62328 (cast_object takes precedence over __toString) +--FILE-- +__toString() . PHP_EOL; + +?> +--EXPECT-- +__toString +__toString -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4': ext/standard/basic_functions.c
Commit:253760bb6b73ad39ec1143aad4ecc95ee281dc7b Author:Xinchen Hui Sun, 12 Aug 2012 21:00:01 +0800 Parents: 9787e7af44096dec749bcb1f71dbf6e9d75e1de5 be818e7ea7a7627ab12faa70d9e70a85c823f738 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=253760bb6b73ad39ec1143aad4ecc95ee281dc7b Log: Merge branch 'PHP-5.4' Changed paths: MM ext/standard/basic_functions.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/standard/basic_functions.c
Commit:dda0565b53803a3fbed36b94e4c03a02d7b7d2a0 Author:Xinchen Hui Sun, 12 Aug 2012 20:58:45 +0800 Parents: 786670f53682c1e43f52c7642e6e47ed25f6708d 4970926e4543c15e16b0c047d85dddfb4c09b581 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dda0565b53803a3fbed36b94e4c03a02d7b7d2a0 Log: Merge branch 'PHP-5.3' into PHP-5.4 Changed paths: MM ext/standard/basic_functions.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update NEWS: NEWS
Commit:be818e7ea7a7627ab12faa70d9e70a85c823f738 Author:Xinchen Hui Sun, 12 Aug 2012 20:59:33 +0800 Parents: dda0565b53803a3fbed36b94e4c03a02d7b7d2a0 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=be818e7ea7a7627ab12faa70d9e70a85c823f738 Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 236f8e5..da53df0 100644 --- a/NEWS +++ b/NEWS @@ -3,17 +3,17 @@ PHP NEWS ?? ??? 2012, PHP 5.4.7 - Core: + . Fixed bug #62763 (register_shutdown_function and extending class). +(Laruence) . Fixed bug #62725 (Calling exit() in a shutdown function does not return the exit value). (Laruence) + . Fixed bug #62328 (implementing __toString and a cast to string fails) +(Laruence) . Fixed bug #51363 (Fatal error raised by var_export() not caught by error handler). (Lonny Kapelushnik) . Fixed bug #40459 (Stat and Dir stream wrapper methods do not call constructor). (Stas) -- SimpleXML: - . Fixed bug #62328 (implementing __toString and a cast to string fails) -(Laruence) - - PDO: . Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #62763 (register_shutdown_function and extending class): NEWS Zend/tests/bug62763.phpt ext/standard/basic_functions.c
Commit:4970926e4543c15e16b0c047d85dddfb4c09b581 Author:Xinchen Hui Sun, 12 Aug 2012 20:58:09 +0800 Parents: e1180b4f1aea83ee5dc7f62832a10056e0f62f18 Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4970926e4543c15e16b0c047d85dddfb4c09b581 Log: Fixed bug #62763 (register_shutdown_function and extending class) Bugs: https://bugs.php.net/62763 Changed paths: M NEWS A Zend/tests/bug62763.phpt M ext/standard/basic_functions.c Diff: diff --git a/NEWS b/NEWS index 70cbe8e..985e274 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2012, PHP 5.3.16 - Core: + . Fixed bug #62763 (register_shutdown_function and extending class). +(Laruence) . Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence) . Fixed bug #62716 (munmap() is called with the incorrect length). (slang...@google.com) diff --git a/Zend/tests/bug62763.phpt b/Zend/tests/bug62763.phpt new file mode 100644 index 000..50c27bd --- /dev/null +++ b/Zend/tests/bug62763.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #62763 (register_shutdown_function and extending class) +--FILE-- + +--EXPECT-- +test1::shutdowntest2::__destruct diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 99831a1..4858b6e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5108,8 +5108,11 @@ void php_free_shutdown_functions(TSRMLS_D) /* {{{ */ zend_hash_destroy(BG(user_shutdown_function_names)); FREE_HASHTABLE(BG(user_shutdown_function_names)); BG(user_shutdown_function_names) = NULL; - } - zend_end_try(); + } zend_catch { + /* maybe shutdown method call exit, we just ignore it */ + FREE_HASHTABLE(BG(user_shutdown_function_names)); + BG(user_shutdown_function_names) = NULL; + } zend_end_try(); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
rasmus Sun, 12 Aug 2012 16:47:31 + Revision: http://svn.php.net/viewvc?view=revision&revision=327078 Log: More karma for nikic and laruence Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2012-08-12 16:16:37 UTC (rev 327077) +++ SVNROOT/global_avail2012-08-12 16:47:31 UTC (rev 327078) @@ -58,7 +58,7 @@ # The PHP Web Group maintains www.php.net, news.php.net, bugs.php.net, # people.php.net, master.php.net, wiki.php.net, pecl.php.net and qa.php.net. -avail|salathe,scottmac,jmertic,lsmith,johannes,iliaa,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till,vrana,tyrael|web/php.git,web/bugs.git,web/master.git,web/news.git,web/php-hosts,web/wiki.git,web/people.git,web/pecl.git,web/qa.git,web/bugs.git +avail|salathe,scottmac,jmertic,lsmith,johannes,iliaa,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till,vrana,tyrael,nikic,laruence|web/php.git,web/bugs.git,web/master.git,web/news.git,web/php-hosts,web/wiki.git,web/people.git,web/pecl.git,web/qa.git,web/bugs.git avail|degeberg|web/bugs.git avail|ericstewart|web/php.git/archive -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php