> could you send the patch in unified diff (diff -u) format?  we have a
> couple
> other pending patches so it might be about time to send this off to
> proposed-updates.

Ok. It is in attach. Thank you!
Ciao, Dino.


-- 
Dino Ciuffetti
Linux System Administrator and Architect
-----------------
TuxWeb S.r.l. - InfoServices EveryWhere - http://www.tuxweb.it
Soluzioni informatiche, sviluppo, applicazioni web, consulenze sistemistiche e 
su prodotti opensource, corsi Linux e molto altro ancora! Per maggiori 
informazioni scrivi a i...@tuxweb.it.

--- ext/standard/array.c	2009-02-04 10:56:53.000000000 +0100
+++ ext/standard/array_patch.c	2009-02-04 10:58:03.000000000 +0100
@@ -2803,7 +2803,7 @@
    Removes duplicate values from array */
 PHP_FUNCTION(array_unique)
 {
-	zval **array;
+	zval **array, *tmp;
 	HashTable *target_hash;
 	Bucket *p;
 	struct bucketindex {
@@ -2822,9 +2822,9 @@
 		RETURN_FALSE;
 	}
 
-	/* copy the argument array */
-	RETVAL_ZVAL(*array, 1, 0);
-
+	array_init(return_value);
+	zend_hash_copy(Z_ARRVAL_P(return_value), target_hash, (copy_ctor_func_t) zval_add_ref, (void *)&tmp, sizeof(zval*));
+	
 	if (target_hash->nNumOfElements <= 1) {	/* nothing to do */
 		return;
 	}

Reply via email to