Prefer using plaintextParams instead of rawParams where possible
[lhc/web/wiklou.git] / includes / specials / SpecialSearch.php
index eeb8823..09210e4 100644 (file)
@@ -352,7 +352,7 @@ class SpecialSearch extends SpecialPage {
                        $out->addHTML( $dymWidget->render( $term, $textMatches ) );
                }
 
-               $hasErrors = $textStatus && $textStatus->getErrors();
+               $hasErrors = $textStatus && $textStatus->getErrors() !== [];
                $hasOtherResults = $textMatches &&
                        $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
 
@@ -529,7 +529,7 @@ class SpecialSearch extends SpecialPage {
                if ( strval( $term ) !== '' ) {
                        $out->setPageTitle( $this->msg( 'searchresults' ) );
                        $out->setHTMLTitle( $this->msg( 'pagetitle' )
-                               ->rawParams( $this->msg( 'searchresults-title' )->rawParams( $term )->text() )
+                               ->plaintextParams( $this->msg( 'searchresults-title' )->plaintextParams( $term )->text() )
                                ->inContentLanguage()->text()
                        );
                }
@@ -555,7 +555,7 @@ class SpecialSearch extends SpecialPage {
         * Extract "power search" namespace settings from the request object,
         * returning a list of index numbers to search.
         *
-        * @param WebRequest $request
+        * @param WebRequest &$request
         * @return array
         */
        protected function powerSearch( &$request ) {