diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-04-12 00:50:36 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-12 00:50:36 +0400 |
commit | b178992cd16a13b68844bcb60fcee9cebabe737b (patch) | |
tree | 48eb27ad11f66c070870151803453583a9ecaaec | |
parent | c6af3781eeafb7bd7f64f08e5eb6c94ca5af7803 (diff) | |
download | php-git-b178992cd16a13b68844bcb60fcee9cebabe737b.tar.gz |
Temporary fix for Zend/tests/bug46238.phpt
-rw-r--r-- | Zend/zend_object_handlers.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 5dba067023..98957ad546 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; } |