From d43e51a42ca248753ef9f274e1a970e0e966af23 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 3 Feb 2015 10:01:08 -0500 Subject: [PATCH] API: Don't dump Title object into API result The intention here is to return the title as a text string, not to dump all the internal fields of Title. Bug: T88397 Change-Id: I43ad3c98bc1fc056a13f57e2e95a122108049334 --- includes/api/ApiQuerySearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 16a491e566..e489b2fef8 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -174,7 +174,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { } if ( !is_null( $result->getRedirectTitle() ) ) { if ( isset( $prop['redirecttitle'] ) ) { - $vals['redirecttitle'] = $result->getRedirectTitle(); + $vals['redirecttitle'] = $result->getRedirectTitle()->getPrefixedText(); } if ( isset( $prop['redirectsnippet'] ) ) { $vals['redirectsnippet'] = $result->getRedirectSnippet(); -- 2.20.1