cvs: ZendEngine2 / zend_API.c
| From: | Marcus Boerger | Date: | Sat, 14 Jan 2006 15:22:19 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4517@lists.php.net to get a copy of this message | ||
helly Sat Jan 14 15:22:19 2006 UTC
Modified files:
/ZendEngine2 zend_API.c
Log:
- Fixed bug #36011
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.333&r2=1.334&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.333 ZendEngine2/zend_API.c:1.334
--- ZendEngine2/zend_API.c:1.333 Sat Jan 7 21:16:02 2006
+++ ZendEngine2/zend_API.c Sat Jan 14 15:22:19 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.333 2006/01/07 21:16:02 helly Exp $ */
+/* $Id: zend_API.c,v 1.334 2006/01/14 15:22:19 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -2601,7 +2601,7 @@
return 1;
}
-static int zend_is_callable_check_func(int check_flags, zval **zobj_ptr, zend_class_entry *ce_org,
zval *callable, zend_class_entry **ce_ptr, zend_function **fptr_ptr TSRMLS_DC)
+static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, zend_class_entry
*ce_org, zval *callable, zend_class_entry **ce_ptr, zend_function **fptr_ptr TSRMLS_DC)
{
int retval;
char *lcname, *lmname, *mname, *colon;
@@ -2660,14 +2660,14 @@
retval = zend_hash_find(ftable, lmname, mlen+1, (void**)&fptr) == SUCCESS ? 1 : 0;
if (!retval) {
- if (zobj_ptr && *ce_ptr && (*ce_ptr)->__call != 0) {
+ if (*zobj_ptr_ptr && *ce_ptr && (*ce_ptr)->__call != 0) {
retval = (*ce_ptr)->__call != NULL;
*fptr_ptr = (*ce_ptr)->__call;
}
} else {
*fptr_ptr = fptr;
if (*ce_ptr) {
- if (!zobj_ptr && !(fptr->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (!*zobj_ptr_ptr && !(fptr->common.fn_flags & ZEND_ACC_STATIC)) {
if ((check_flags & IS_CALLABLE_CHECK_IS_STATIC) != 0) {
retval = 0;
} else {
@@ -2676,7 +2676,7 @@
}
if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) {
if (fptr->op_array.fn_flags & ZEND_ACC_PRIVATE) {
- if (!zend_check_private(fptr, zobj_ptr ? Z_OBJCE_PP(zobj_ptr) : EG(scope), lmname, mlen
TSRMLS_CC)) {
+ if (!zend_check_private(fptr, *zobj_ptr_ptr ? Z_OBJCE_PP(*zobj_ptr_ptr) : EG(scope), lmname,
mlen TSRMLS_CC)) {
retval = 0;
}
} else if ((fptr->common.fn_flags & ZEND_ACC_PROTECTED)) {
@@ -2724,7 +2724,7 @@
return 1;
}
- return zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, NULL, NULL,
callable, ce_ptr, fptr_ptr TSRMLS_CC);
+ return zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, zobj_ptr_ptr, NULL,
callable, ce_ptr, fptr_ptr TSRMLS_CC);
case IS_ARRAY:
{
@@ -2815,13 +2815,6 @@
} else if (zend_u_lookup_class(Z_TYPE_PP(obj), Z_UNIVAL_PP(obj), Z_UNILEN_PP(obj), &pce
TSRMLS_CC) == SUCCESS) {
ce = *pce;
}
- if (EG(This)) {
- if (instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
- *zobj_ptr_ptr = &EG(This);
- zend_error(E_STRICT, "Non-static method %v::%R() cannot be called statically, assuming
$this from compatible context %s", ce->name, Z_TYPE_PP(method), Z_STRVAL_PP(method),
Z_OBJCE_P(EG(This))->name);
- }
- }
-
efree(lcname);
} else {
ce = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */
@@ -2873,7 +2866,7 @@
}
if (ce) {
- return zend_is_callable_check_func(check_flags, *zobj_ptr_ptr, ce, *method, ce_ptr, fptr_ptr
TSRMLS_CC);
+ return zend_is_callable_check_func(check_flags, zobj_ptr_ptr, ce, *method, ce_ptr, fptr_ptr
TSRMLS_CC);
}
} else if (callable_name) {
ZVAL_ASCII_STRINGL(callable_name, "Array", sizeof("Array")-1, 1);