[-] BO : #PSCFV-3222 - Fix array unique strange working

This commit is contained in:
mDeflotte
2012-07-16 13:44:38 +00:00
parent b9fad9c5ef
commit d63b93a66e
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -2178,6 +2178,19 @@ FileETag INode MTime Size
return false;
}
/**
* Reproduce array_unique working before php version 5.2.9
* @param array $array
* @return array
*/
public static function arrayUnique($array)
{
if (version_compare(phpversion(), '5.2.9', '<'))
return array_unique($array);
else
return array_unique($array, SORT_REGULAR);
}
}
/**