ID: 42419 User updated by: bug at nyvegetarianexpo dot org Reported By: bug at nyvegetarianexpo dot org Status: Bogus Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.2.3 New Comment:
"due to different arrays being passed" in my last comment should have been preceded by "NOT". (I better get some sleep!) Previous Comments: ------------------------------------------------------------------------ [2007-08-25 05:28:16] bug at nyvegetarianexpo dot org Oops, you are right. Sorry. I must have imagined the array_ suffix when I typed it into my script after looking up the function names for sort and array_unique! The fact that it did not fail every time must have been due to my control structure in the original script and due to different arrays being passed. I assume that it will work now with the correct name. I will check. Again, Sorry. Big brain-malfunction! ------------------------------------------------------------------------ [2007-08-25 04:48:07] crrodriguez at suse dot de There is no array_sort function in the PHP source code.. what are you talking about ? functions are asort() and array_multisort and both work fine with your code..care to provide a working test ? ------------------------------------------------------------------------ [2007-08-24 23:25:18] bug at nyvegetarianexpo dot org Description: ------------ Depending on the array passed to it, the built in function array_sort will never return and all output after it be lost. The code needed to reproduce this bug is embassingly simply. It will bomb on an array of length two, but also others, but not all arrays. It actually works for some. I am not privy to all their compilation/configuration options, but I have run into this problem with two HSPs both on a linux box. I can print_r(get_defined_constants()); if desired, however. Reproduce code: --------------- <HTML><TITLE>Array_sort bug test</TITLE><BODY> <pre> <?php $a[] = '2007-09-15 10:00:00'; $a[] = '2007-09-15 16:00:00'; print_r($a); echo "\nHANGS...\n"; array_sort($a); print_r($a); ?> </pre> <b>No, it works!</b> </BODY> </HTML> Expected result: ---------------- Array ( [0] => 2007-09-15 10:00:00 [1] => 2007-09-15 16:00:00 ) HANGS... Array ( [0] => 2007-09-15 10:00:00 [1] => 2007-09-15 16:00:00 ) No, it works! Actual result: -------------- Array ( [0] => 2007-09-15 10:00:00 [1] => 2007-09-15 16:00:00 ) HANGS... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42419&edit=1