Re: [PHP4BETA] min() function stops on arrays...

[email protected] (Andrei Zmievski) Tue, 30 May 2000 15:12:27 -0500
Newsgroups php.version4
Message-ID <[email protected]>
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.diff (text/plain, 556 B)
--- 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;