Re: [PHP4BETA] min() function stops on arrays...
| From: | Andrei Zmievski | Date: | Tue, 30 May 2000 20:12:27 +0000 |
| Subject: | Re: [PHP4BETA] min() function stops on arrays... | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-15950@lists.php.net to get a copy of this message | ||
On Mon, 29 May 2000, Lukasz Felsztukier wrote:
> Where can I obtain it ?
I attached a patch, if you want to apply it to your sources.
-Andrei
* If it ain't broken, it doesn't have enough features yet. *
--- array.c 2000/05/24 08:41:35 1.45 +++ array.c 2000/05/24 19:07:17 1.46 @@ -853,6 +853,7 @@ php_error(E_WARNING, "min: must be passed at least 1 value"); RETURN_NULL(); } + set_compare_func(SORT_REGULAR); if (argc == 1) { pval **arr; @@ -904,6 +905,7 @@ php_error(E_WARNING, "max: must be passed at least 1 value"); RETURN_NULL(); } + set_compare_func(SORT_REGULAR); if (argc == 1) { pval **arr;
--- array.c 2000/05/24 08:41:35 1.45 +++ array.c 2000/05/24 19:07:17 1.46 @@ -853,6 +853,7 @@ php_error(E_WARNING, "min: must be passed at least 1 value"); RETURN_NULL(); } + set_compare_func(SORT_REGULAR); if (argc == 1) { pval **arr; @@ -904,6 +905,7 @@ php_error(E_WARNING, "max: must be passed at least 1 value"); RETURN_NULL(); } + set_compare_func(SORT_REGULAR); if (argc == 1) { pval **arr;