tony2001                Sun Mar 19 22:12:39 2006 UTC

  Modified files:              
    /php-src/ext/standard       array.c 
  Log:
  make the code a bit cleaner - no need for two different checks that are doing 
effectively the same
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.344&r2=1.345&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.344 php-src/ext/standard/array.c:1.345
--- php-src/ext/standard/array.c:1.344  Thu Mar  2 13:12:45 2006
+++ php-src/ext/standard/array.c        Sun Mar 19 22:12:39 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.344 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: array.c,v 1.345 2006/03/19 22:12:39 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -4335,12 +4335,10 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument 
should be an array");
                return;
        }
-       if (callback) {
-               func = *callback;
-       }
        array = *input;
 
        if (ZEND_NUM_ARGS() > 1) {
+               func = *callback;
                if (!zend_is_callable(func, 0, &callback_name)) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "The second 
argument, '%R', should be a valid callback", Z_TYPE(callback_name), 
Z_UNIVAL(callback_name));
                        zval_dtor(&callback_name);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to