com php-src: Merge branch 'PHP-5.3' into PHP-5.4: NEWS Zend/zend.c Zend/zend_object_handlers.c
| From: | Dmitry Stogov | Date: | Thu, 06 Sep 2012 08:14:29 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.3' into PHP-5.4: NEWS Zend/zend.c Zend/zend_object_handlers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70128@lists.php.net to get a copy of this message | ||
Commit: 6ba376f552238de643a665d355fd5e59c40315b5
Author: Dmitry Stogov <dmitry@zend.com> Thu, 6 Sep 2012 12:14:29 +0400
Parents: a43c45ea7d354179df91a59795faa0bcbceb1812 b29dc146b9311c14186c14bcb1c8ae5288b65d73
Branches: PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6ba376f552238de643a665d355fd5e59c40315b5
Log:
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
- Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909
(custom error handler throwing Exception + fatal error = no shutdown function)
Conflicts:
NEWS
Zend/zend_object_handlers..c
Bugs:
https://bugs.php.net/61767
https://bugs.php.net/60909
Changed paths:
MM NEWS
MM Zend/zend.c
MM Zend/zend_object_handlers.c
Diff:
diff --cc NEWS
index 22d3f66,a1ff9b9..db6f7f4
--- a/NEWS
+++ b/NEWS
@@@ -1,58 -1,30 +1,62 @@@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2012, PHP 5.3.16
+?? ??? 2012, PHP 5.4.8
- Core:
+ . Added optional second argument for assert() to specify custom message. Patch
+ by Lonny Kapelushnik (lonny@lonnylot.com). (Lars)
. Fixed bug #62976 (Notice: could not be converted to int when comparing
some builtin classes). (Laruence)
- . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
. Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
Windows registry). (aserbulov at parallels dot com)
- . 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).
- (slangley@google.com)
- . Fixed bug #62460 (php binaries installed as binary.dSYM). (Reeze Xia)
+ . Fixed bug #62907 (Double free when use traits). (Dmitry)
+ . Fixed bug #61767 (Shutdown functions not called in certain error
+ situation). (Dmitry)
- . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
- with run-test.php). (Laruence)
+ . Fixed bug #60909 (custom error handler throwing Exception + fatal error
+ = no shutdown function). (Dmitry)
+- SOAP
+ .. Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
+ (Dmitry)
+
+- SPL:
+ . Bug #62987 (Assigning to ArrayObject[null][something] overrides all
+ undefined variables). (Laruence)
+
+- mbstring:
+ . Allow passing null as a default value to mb_substr() and mb_strcut(). Patch
+ by Alexander Moskaliov via GitHub PR #133. (Lars)
+
+- Filter extension:
+ . Bug #49510: Boolean validation fails with FILTER_NULL_ON_FAILURE with empty
+ string or false. (Lars)
+
+?? ??? 2012, PHP 5.4.7
+
+- Core:
+ . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
+ . Fixed bug #62844 (parse_url() does not recognize //). (Andrew Faulds).
+ . Fixed bug #62829 (stdint.h included on platform where HAVE_STDINT_H is not
+ set). (Felipe)
+ . 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 #62744 (dangling pointers made by zend_disable_class). (Laruence)
+ . Fixed bug #62716 (munmap() is called with the incorrect length).
+ (slangley@google.com)
+ . Fixed bug #62358 (Segfault when using traits a lot). (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)
+
- CURL:
+ . Fixed bug #62912 (CURLINFO_PRIMARY_* AND CURLINFO_LOCAL_* not exposed).
+ (Pierrick)
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
- . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
- (r.hampartsumyan@gmail.com, Laruence)
- DateTime:
. Fixed bug #62852 (Unserialize invalid DateTime causes crash).
diff --cc Zend/zend.c
index 09338e7,bd53d55..9ab879a
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@@ -1025,9 -994,32 +1025,32 @@@ ZEND_API void zend_error(int type, cons
zend_stack object_stack;
zend_stack declare_stack;
zend_stack list_stack;
- zend_stack labels_stack;
+ zend_stack context_stack;
TSRMLS_FETCH();
+ /* Report about uncaught exception in case of fatal errors */
+ if (EG(exception)) {
+ switch (type) {
+ case E_CORE_ERROR:
+ case E_ERROR:
+ case E_RECOVERABLE_ERROR:
+ case E_PARSE:
+ case E_COMPILE_ERROR:
+ case E_USER_ERROR:
+ if (zend_is_executing(TSRMLS_C)) {
+ error_lineno = zend_get_executed_lineno(TSRMLS_C);
+ }
+ zend_exception_error(EG(exception), E_WARNING TSRMLS_CC);
+ EG(exception) = NULL;
+ if (zend_is_executing(TSRMLS_C) && EG(opline_ptr)) {
+ active_opline->lineno = error_lineno;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
diff --cc Zend/zend_object_handlers.c
index 60095f7,eae47d9..d82493a
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@@ -1490,10 -1272,11 +1490,11 @@@ ZEND_API int zend_std_cast_object_tostr
if (retval) {
zval_ptr_dtor(&retval);
}
+ EG(exception) = NULL;
- zend_error(E_ERROR, "Method %s::__toString() must not throw an exception",
ce->name);
+ zend_error_noreturn(E_ERROR, "Method %s::__toString() must not throw an exception",
ce->name);
return FAILURE;
}
- if (Z_TYPE_P(retval) == IS_STRING) {
+ if (EXPECTED(Z_TYPE_P(retval) == IS_STRING)) {
INIT_PZVAL(writeobj);
if (readobj == writeobj) {
zval_dtor(readobj);