From: Brad Jorsch Date: Tue, 3 Feb 2015 15:01:08 +0000 (-0500) Subject: API: Don't dump Title object into API result X-Git-Tag: 1.31.0-rc.0~12525 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=d43e51a42ca248753ef9f274e1a970e0e966af23;p=lhc%2Fweb%2Fwiklou.git 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 --- 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();