Skip to content

Commit

Permalink
fixed issue relatedOne return array instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor de Mooij, Buurtnerd committed Jan 26, 2011
1 parent 19d5adb commit 6147dd7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion RedBean/Facade.php
Expand Up @@ -318,7 +318,7 @@ public static function unrelated(RedBean_OODBBean $bean, $type, $sql=null, $valu
*/
public static function relatedOne( RedBean_OODBBean $bean, $type, $sql='1', $values=array() ) {
$beans = self::related($bean, $type, $sql, $values);
if (count($beans)==0) return array();
if (count($beans)==0) return null;
return reset( $beans );
}

Expand Down
26 changes: 0 additions & 26 deletions build.php

This file was deleted.

0 comments on commit 6147dd7

Please sign in to comment.