From f4b9c8734e39e69f3db1c6f658fc13e7db7d747a Mon Sep 17 00:00:00 2001 From: mlitn Date: Tue, 3 Jul 2012 10:33:42 -0700 Subject: [PATCH] Fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn't always return an array This was originally part of https://gerrit.wikimedia.org/r/13880 Change-Id: I0b737bafa59c97ff0b658189c53022388bb7a56d --- includes/db/DatabaseUtility.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php index eacebcfc69..c846788d75 100644 --- a/includes/db/DatabaseUtility.php +++ b/includes/db/DatabaseUtility.php @@ -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 ) { -- 2.20.1