always return an array from find_all

This commit is contained in:
Isaac Connor 2018-04-20 14:23:27 -04:00
parent 9de3c44702
commit ac775f13f6
1 changed files with 4 additions and 3 deletions

View File

@ -73,13 +73,14 @@ class Frame {
$file = $backTrace[1]['file'];
$line = $backTrace[1]['line'];
Error("Invalid value for limit($limit) passed to Frame::find from $file:$line");
return;
return array();
}
}
$results = dbFetchAll($sql, NULL, $values);
if ( $results ) {
return array_map( function($id){ return new Frame($id); }, $results );
}
return array();
}
public static function find_one( $parameters = array() ) {