make sure the optimisations are reliable

This commit is contained in:
redmatrix 2016-06-20 20:56:58 -07:00
parent ed16660867
commit 63423c8ee1

View File

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