From: Andrei Zmievski Date: Fri, 16 Mar 2001 19:51:08 +0000 (+0000) Subject: All user callbacks should be to EG(function_table). X-Git-Tag: php-4.0.6RC1~670 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7f2cf9de58f88e0cd47264dcf29dfc5f399b4eb;p=php All user callbacks should be to EG(function_table). --- diff --git a/ext/standard/array.c b/ext/standard/array.c index b8de45dbd2..6da53227fe 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -521,7 +521,7 @@ static int array_user_compare(const void *a, const void *b) Bucket *s; pval **args[2]; pval *retval_ptr; - CLS_FETCH(); + ELS_FETCH(); BLS_FETCH(); f = *((Bucket **) a); @@ -530,7 +530,7 @@ static int array_user_compare(const void *a, const void *b) args[0] = (pval **) f->pData; args[1] = (pval **) s->pData; - if (call_user_function_ex(CG(function_table), NULL, *BG(user_compare_func_name), &retval_ptr, 2, args, 0, NULL)==SUCCESS + if (call_user_function_ex(EG(function_table), NULL, *BG(user_compare_func_name), &retval_ptr, 2, args, 0, NULL)==SUCCESS && retval_ptr) { long retval; @@ -609,7 +609,7 @@ static int array_user_key_compare(const void *a, const void *b) pval *args[2]; pval retval; int status; - CLS_FETCH(); + ELS_FETCH(); BLS_FETCH(); args[0] = &key1; @@ -637,7 +637,7 @@ static int array_user_key_compare(const void *a, const void *b) Z_TYPE(key2) = IS_LONG; } - status = call_user_function(CG(function_table), NULL, *BG(user_compare_func_name), &retval, 2, args); + status = call_user_function(EG(function_table), NULL, *BG(user_compare_func_name), &retval, 2, args); zval_dtor(&key1); zval_dtor(&key2); @@ -958,7 +958,6 @@ static int php_array_walk(HashTable *target_hash, zval **userdata) ulong num_key; HashPosition pos; BLS_FETCH(); - CLS_FETCH(); ELS_FETCH(); /* Allocate space for key */