com php-src: Temporary fix for Zend/tests/bug46238.phpt: Zend/zend_object_handlers.c

From: Date: Fri, 11 Apr 2014 20:50:36 +0000
Subject: com php-src: Temporary fix for Zend/tests/bug46238.phpt: Zend/zend_object_handlers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77409@lists.php.net to get a copy of this message
Commit: b178992cd16a13b68844bcb60fcee9cebabe737b Author: Dmitry Stogov <dmitry@zend.com> Sat, 12 Apr 2014 00:50:36 +0400 Parents: c6af3781eeafb7bd7f64f08e5eb6c94ca5af7803 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b178992cd16a13b68844bcb60fcee9cebabe737b Log: Temporary fix for Zend/tests/bug46238.phpt Bugs: https://bugs.php.net/46238 Changed paths: M Zend/zend_object_handlers.c Diff: diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 5dba067..98957ad 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1024,7 +1024,13 @@ static inline union _zend_function *zend_get_user_call_function(zend_class_entry call_user_call->num_args = 0; call_user_call->scope = ce; call_user_call->fn_flags = ZEND_ACC_CALL_VIA_HANDLER; - call_user_call->function_name = STR_COPY(method_name); + //??? keep compatibility for "\0" characters + //??? see: Zend/tests/bug46238.phpt + if (UNEXPECTED(strlen(method_name->val) != method_name->len)) { + call_user_call->function_name = STR_INIT(method_name->val, strlen(method_name->val), 0); + } else { + call_user_call->function_name = STR_COPY(method_name); + } return (union _zend_function *)call_user_call; } @@ -1157,7 +1163,13 @@ static inline union _zend_function *zend_get_user_callstatic_function(zend_class callstatic_user_call->num_args = 0; callstatic_user_call->scope = ce; callstatic_user_call->fn_flags = ZEND_ACC_STATIC | ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER; - callstatic_user_call->function_name = STR_COPY(method_name); + //??? keep compatibility for "\0" characters + //??? see: Zend/tests/bug46238.phpt + if (UNEXPECTED(strlen(method_name->val) != method_name->len)) { + callstatic_user_call->function_name = STR_INIT(method_name->val, strlen(method_name->val), 0); + } else { + callstatic_user_call->function_name = STR_COPY(method_name); + } return (zend_function *)callstatic_user_call; }

« previous php.cvs (#77409) next »