always return an array from find_all
This commit is contained in:
parent
9de3c44702
commit
ac775f13f6
|
@ -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() ) {
|
||||
|
|
Loading…
Reference in New Issue