diff options
author | Sean Finney <seanius@debian.org> | 2009-04-10 14:09:48 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2009-04-10 14:09:48 +0200 |
commit | cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (patch) | |
tree | 1315c623bb7d9dfa8d366fa9cd2c6834ceeb5da5 /Zend/zend_API.c | |
parent | 9ea47aab740772adf0c69d8c94b208a464e599ea (diff) | |
download | php-cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f.tar.gz |
Imported Upstream version 5.2.9.dfsg.1upstream/5.2.9.dfsg.1
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 1f1e8c839..49568a295 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2008 Zend Technologies Ltd. (http://www.zend.com) | + | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.296.2.27.2.38 2008/03/06 17:28:47 tony2001 Exp $ */ +/* $Id: zend_API.c,v 1.296.2.27.2.41 2009/01/08 21:39:06 andrei Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1779,9 +1779,13 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr efree(lc_class_name); } while (ptr->fname) { - if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) { + fname_len = strlen(ptr->fname); + lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len); + if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) { + efree(lowercase_name); zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname); } + efree(lowercase_name); ptr++; } zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); @@ -2212,6 +2216,10 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze retval = 0; } } + if (!retval && *zobj_ptr_ptr && *ce_ptr && (*ce_ptr)->__call != 0) { + retval = (*ce_ptr)->__call != NULL; + *fptr_ptr = (*ce_ptr)->__call; + } } } } |