Fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn...
authormlitn <git@mullie.eu>
Tue, 3 Jul 2012 17:33:42 +0000 (10:33 -0700)
committerCatrope <roan.kattouw@gmail.com>
Tue, 3 Jul 2012 17:35:19 +0000 (10:35 -0700)
This was originally part of https://gerrit.wikimedia.org/r/13880

Change-Id: I0b737bafa59c97ff0b658189c53022388bb7a56d

includes/db/DatabaseUtility.php

index eacebcf..c846788 100644 (file)
@@ -242,7 +242,11 @@ class FakeResultWrapper extends ResultWrapper {
                        $this->currentRow = false;
                }
                $this->pos++;
-               return $this->currentRow;
+               if ( is_object( $this->currentRow ) ) {
+                       return get_object_vars( $this->currentRow );
+               } else {
+                       return $this->currentRow;
+               }
        }
 
        function seek( $row ) {