- Fixed ZTS destruction. (Marcus)
- Fixed bug #32491 (File upload error - unable to create a temporary file).
(Uwe Schindler)
+- Fixed bug #32429 (method_exists() always return TRUE if __call method
+ exists). (Dmitry)
- Fixed bug #32109 ($_POST is not populated in multithreaded environment).
(Moriyoshi)
- Fixed bug #31478 (segfault with empty() / isset()). (Moriyoshi)
--- /dev/null
+--TEST--
+Bug #32429 (method_exists() always return TRUE if __call method exists)
+--FILE--
+<?php
+
+class TestClass {
+ public function __construct() {
+ var_dump(method_exists($this, 'test'));
+
+ if (method_exists($this, 'test')) {
+ $this->test();
+ }
+ }
+
+ public function __call($name, $args) {
+ throw new Exception('Call to undefined method'.get_class($this).'::'.$name.'()');
+ }
+}
+
+try {
+ $test = new TestClass;
+} catch (Exception $e) {
+ exit($e->getMessage());
+}
+
+?>
+--EXPEXT--
+bool(false)
efree(lcname);
RETURN_TRUE;
} else {
+ union _zend_function *func = NULL;
efree(lcname);
+
if (Z_TYPE_PP(klass) == IS_OBJECT
&& Z_OBJ_HT_PP(klass)->get_method != NULL
- && Z_OBJ_HT_PP(klass)->get_method(klass, Z_STRVAL_PP(method_name), Z_STRLEN_PP(method_name) TSRMLS_CC) != NULL
+ && (func = Z_OBJ_HT_PP(klass)->get_method(klass, Z_STRVAL_PP(method_name), Z_STRLEN_PP(method_name) TSRMLS_CC)) != NULL
) {
+ if (func->type == ZEND_INTERNAL_FUNCTION
+ && ((zend_internal_function*)func)->handler == zend_std_call_user_call
+ ) {
+ efree(((zend_internal_function*)func)->function_name);
+ efree(func);
+ RETURN_FALSE;
+ }
RETURN_TRUE;
}
}