sixd            Fri May 15 16:44:51 2009 UTC

  Added files:                 
    /php-src/ext/standard/tests/array   array_multisort_variation11.phpt 

  Modified files:              
    /php-src/ext/standard       array.c 
  Log:
  New array_multisort() test and code comment fix (Simon Westcott)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.476&r2=1.477&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.476 php-src/ext/standard/array.c:1.477
--- php-src/ext/standard/array.c:1.476  Sun May 10 16:45:30 2009
+++ php-src/ext/standard/array.c        Fri May 15 16:44:51 2009
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.476 2009/05/10 16:45:30 colder Exp $ */
+/* $Id: array.c,v 1.477 2009/05/15 16:44:51 sixd Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3979,7 +3979,7 @@
                }
        }
 
-       /* If all arrays are empty or have only one entry, we don't need to do 
anything. */
+       /* If all arrays are empty we don't need to do anything. */
        if (array_size < 1) {
                for (k = 0; k < MULTISORT_LAST; k++) {
                        efree(ARRAYG(multisort_flags)[k]);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_multisort_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_multisort_variation11.phpt
+++ php-src/ext/standard/tests/array/array_multisort_variation11.phpt
--TEST--
Test array_multisort() function : usage variation - testing with empty array
--FILE--
<?php
/* Prototype  : bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, 
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, 
SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])
 * Description: Sort multiple arrays at once similar to how ORDER BY clause 
works in SQL
 * Source code: ext/standard/array.c
 * Alias to functions:
 */

echo "*** Testing array_multisort() : Testing with empty array ***\n";

var_dump(array_multisort(array()));

?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
===DONE===



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

Reply via email to