code optimisation

This commit is contained in:
redmatrix
2016-06-20 20:34:19 -07:00
parent 9c9d6363af
commit ed16660867
4 changed files with 13 additions and 30 deletions

View File

@@ -2050,7 +2050,7 @@ function ids_to_array($arr,$idx = 'id') {
$t = array();
if($arr) {
foreach($arr as $x) {
if(! in_array($x[$idx],$t)) {
if(strlen($x[$idx]) && (! in_array($x[$idx],$t))) {
$t[] = $x[$idx];
}
}