Always return an array from find
parent
882e47c9ab
commit
b4f80fbe11
|
@ -98,7 +98,7 @@ class Server {
|
|||
$file = $backTrace[1]['file'];
|
||||
$line = $backTrace[1]['line'];
|
||||
Error("Invalid value for limit($limit) passed to Server::find from $file:$line");
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ class Server {
|
|||
if ( $results ) {
|
||||
return array_map( function($id){ return new Server($id); }, $results );
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
public static function find_one( $parameters = array() ) {
|
||||
|
|
Loading…
Reference in New Issue