summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2012-10-17 17:23:37 +0200
committerAndrey Hristov <andrey@php.net>2012-10-17 17:23:37 +0200
commit7314ed535f93841ff2d2bca5e65afcb0f2b003bb (patch)
treebceec620f2cb1d5f255196e00ae7ea1187b41fe2 /Zend/zend_API.c
parentc50d732f7686352381d44926988aca194204433d (diff)
parentda541ff561e0ac6ac72d2efd8b785ecfeef868dc (diff)
downloadphp-git-7314ed535f93841ff2d2bca5e65afcb0f2b003bb.tar.gz
Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 70cf0c7af8..d529775764 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2122,7 +2122,9 @@ void module_destructor(zend_module_entry *module) /* {{{ */
/* Deinitilaise module globals */
if (module->globals_size) {
#ifdef ZTS
- ts_free_id(*module->globals_id_ptr);
+ if (*module->globals_id_ptr) {
+ ts_free_id(*module->globals_id_ptr);
+ }
#else
if (module->globals_dtor) {
module->globals_dtor(module->globals_ptr TSRMLS_CC);
@@ -2601,7 +2603,14 @@ get_function_via_handler:
if (retval) {
if (fcc->calling_scope && !call_via_handler) {
- if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (!fcc->object_ptr && (fcc->function_handler->common.fn_flags & ZEND_ACC_ABSTRACT)) {
+ if (error) {
+ zend_spprintf(error, 0, "cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ retval = 0;
+ } else {
+ zend_error(E_ERROR, "Cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ }
+ } else if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) {
int severity;
char *verb;
if (fcc->function_handler->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {