Skip to content

Commit

Permalink
fixed minor issue, fineOne now returns null instead of false which is…
Browse files Browse the repository at this point in the history
… more logical
  • Loading branch information
= committed Dec 8, 2011
1 parent 31a694a commit d2b1dd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RedBean/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ public static function findAndExport($type, $sql=null, $values=array()) {
*/
public static function findOne( $type, $sql=null, $values=array()) {
$items = self::find($type,$sql,$values);
return reset($items);
$found = reset($items);
if (!$found) return null;
return $found;
}

/**
Expand Down

0 comments on commit d2b1dd2

Please sign in to comment.