cvs: php4 /ext/standard basic_functions.c

From: Date: Mon, 05 Feb 2001 17:37:50 +0000
Subject: cvs: php4 /ext/standard basic_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3911@lists.php.net to get a copy of this message
andrei Mon Feb 5 09:37:50 2001 EDT Modified files: /php4/ext/standard basic_functions.c Log: Allow calling static methods via call_user_method_* functions. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.300 php4/ext/standard/basic_functions.c:1.301 --- php4/ext/standard/basic_functions.c:1.300 Sun Jan 21 09:26:43 2001 +++ php4/ext/standard/basic_functions.c Mon Feb 5 09:37:47 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.300 2001/01/21 17:26:43 rasmus Exp $ */ +/* $Id: basic_functions.c,v 1.301 2001/02/05 17:37:47 andrei Exp $ */ #include "php.h" #include "php_main.h" @@ -1656,8 +1656,8 @@ efree(params); RETURN_FALSE; } - if (Z_TYPE_PP(params[1]) != IS_OBJECT) { - php_error(E_WARNING,"2nd argument is not an object\n"); + if (Z_TYPE_PP(params[1]) != IS_OBJECT && Z_TYPE_PP(params[1]) != IS_STRING) { + php_error(E_WARNING,"2nd argument is not an object or class name\n"); efree(params); RETURN_FALSE; } @@ -1693,7 +1693,8 @@ WRONG_PARAM_COUNT; } convert_to_string_ex(method_name); - convert_to_object_ex(obj); + if (Z_TYPE_PP(obj) != IS_OBJECT && Z_TYPE_PP(obj) != IS_STRING) + convert_to_object_ex(obj); convert_to_array_ex(params); params_ar = HASH_OF(*params);

« previous php.cvs (#3911) next »