diff options
| author | Remi Collet <remi@php.net> | 2017-06-26 17:22:01 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2017-06-26 17:22:01 +0200 |
| commit | 85c32322acfc07628140bf631e7c52b12e6050b4 (patch) | |
| tree | ae79035283e68957177407123d7d342278e021d9 /Zend/zend_execute_API.c | |
| parent | 4ed8ff509001b35e0cb971a1d6a294345c5d7673 (diff) | |
| parent | caaeb4849aa56cbbdc66ea015c11a58bd47a43ff (diff) | |
| download | php-git-85c32322acfc07628140bf631e7c52b12e6050b4.tar.gz | |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (24 commits)
Removed EG(valid_symbol_table). Used EG(active) instead.
Release temporary string reference
Remove superfluous semicolons
Fix tests on Windows
Produce a better exception message when IntlDateFormatter constructor fails.
Fix format arguments
Remove unused variable op2. It is redeclared later.
Fix typo
Implement object type annotation
Fixed bug #73173
Expose inflate_get_status() and inflate_get_read_len() functions
Add more constants, improve comments, and add tests
Fixed bug #73900
Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
Drop soap_hash_str_find_deref()
Only compute callback name in error cases
Extract zend_get_callable_name() API
Move va_copy compatibility code into zend_portability.h
Remove unnecessary string copy
Fix FE_FETCH_* exception check
...
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index fec7f73f57..5e02b78af1 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -146,7 +146,6 @@ void init_executor(void) /* {{{ */ zend_vm_stack_init(); zend_hash_init(&EG(symbol_table), 64, NULL, ZVAL_PTR_DTOR, 0); - EG(valid_symbol_table) = 1; zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_activator); @@ -267,7 +266,6 @@ void shutdown_executor(void) /* {{{ */ /* All resources and objects are destroyed. */ /* No PHP callback functions may be called after this point. */ EG(active) = 0; - EG(valid_symbol_table) = 0; zend_try { zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator); @@ -703,19 +701,18 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / } if (!fci_cache || !fci_cache->initialized) { - zend_string *callable_name; char *error = NULL; if (!fci_cache) { fci_cache = &fci_cache_local; } - if (!zend_is_callable_ex(&fci->function_name, fci->object, IS_CALLABLE_CHECK_SILENT, &callable_name, fci_cache, &error)) { + if (!zend_is_callable_ex(&fci->function_name, fci->object, IS_CALLABLE_CHECK_SILENT, NULL, fci_cache, &error)) { if (error) { + zend_string *callable_name + = zend_get_callable_name_ex(&fci->function_name, fci->object); zend_error(E_WARNING, "Invalid callback %s, %s", ZSTR_VAL(callable_name), error); efree(error); - } - if (callable_name) { zend_string_release(callable_name); } if (EG(current_execute_data) == &dummy_execute_data) { @@ -730,16 +727,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / zend_error(E_DEPRECATED, "%s", error); efree(error); if (UNEXPECTED(EG(exception))) { - if (callable_name) { - zend_string_release(callable_name); - } if (EG(current_execute_data) == &dummy_execute_data) { EG(current_execute_data) = dummy_execute_data.prev_execute_data; } return FAILURE; } } - zend_string_release(callable_name); } func = fci_cache->function_handler; @@ -1672,7 +1665,7 @@ ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force) /* {{ if (force) { zend_array *symbol_table = zend_rebuild_symbol_table(); if (symbol_table) { - return zend_hash_update(symbol_table, name, value) ? SUCCESS : FAILURE;; + return zend_hash_update(symbol_table, name, value) ? SUCCESS : FAILURE; } } } else { @@ -1714,7 +1707,7 @@ ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, i if (force) { zend_array *symbol_table = zend_rebuild_symbol_table(); if (symbol_table) { - return zend_hash_str_update(symbol_table, name, len, value) ? SUCCESS : FAILURE;; + return zend_hash_str_update(symbol_table, name, len, value) ? SUCCESS : FAILURE; } } } else { |
