diff options
| author | Stig Venaas <venaas@php.net> | 2000-06-11 12:20:42 +0000 |
|---|---|---|
| committer | Stig Venaas <venaas@php.net> | 2000-06-11 12:20:42 +0000 |
| commit | 2e738b519f5b74a81a199ea7df20ec610f181496 (patch) | |
| tree | de36667711a4abad3d748b0b5cee5f662da63ebe /ext/standard/array.c | |
| parent | b8063c342c4566f197312392538666c32efd0369 (diff) | |
| download | php-git-2e738b519f5b74a81a199ea7df20ec610f181496.tar.gz | |
Forgot to set_compare_func in the new array functions, had only tested
with older source.
Diffstat (limited to 'ext/standard/array.c')
| -rw-r--r-- | ext/standard/array.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 72462a245c..9c154dc7b8 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2175,6 +2175,7 @@ PHP_FUNCTION(array_unique) for (i = 0, p = target_hash->pListHead; p; i++, p = p->pListNext) arTmp[i] = p; arTmp[i] = NULL; + set_compare_func(SORT_REGULAR); qsort((void *) arTmp, i, sizeof(Bucket *), array_data_compare); /* go through the sorted array and delete duplicates from the copy */ @@ -2220,6 +2221,7 @@ PHP_FUNCTION(array_intersect) /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **)); + set_compare_func(SORT_REGULAR); for (i=0; i<argc; i++) { if ((*args[i])->type != IS_ARRAY) { php_error(E_WARNING, "Argument #%d to array_intersect() is not an array", i+1); @@ -2317,6 +2319,7 @@ PHP_FUNCTION(array_diff) /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **)); + set_compare_func(SORT_REGULAR); for (i=0; i<argc; i++) { if ((*args[i])->type != IS_ARRAY) { php_error(E_WARNING, "Argument #%d to array_intersect() is not an array", i+1); |
