Follow up to r111309; fix if condition and style fix
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Sun, 12 Feb 2012 18:11:23 +0000 (18:11 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Sun, 12 Feb 2012 18:11:23 +0000 (18:11 +0000)
includes/DBDataObject.php

index f2bd5d7..0975239 100644 (file)
@@ -207,7 +207,7 @@ abstract class DBDataObject {
                                array( 'LIMIT' => 1 )
                        );
 
-                       if ( !$result ) {
+                       if ( $result !== false ) {
                                $this->setFields( $this->getFieldsFromDBResult( $result ), $override );
                                return true;
                        }
@@ -880,7 +880,8 @@ abstract class DBDataObject {
                }
                
                $dbr = wfGetDB( static::getReadDb() );
-               $result = $dbr->select(static::getDBTable(),
+               $result = $dbr->select(
+                       static::getDBTable(),
                        static::getPrefixedFields( $fields ),
                        static::getPrefixedValues( $conditions ),
                        __METHOD__,