X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialSearch.php;h=171566b6c798059a9093f9fdec2eaed69627c5b5;hb=5833dda61d64afdcacf5e6d73aaae2800cc8e496;hp=e6d06329ad741965a5b3222054cff18816387048;hpb=b3b2a72e718cd8c18af9dbb7b1ab80e90dbd79cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index e6d06329ad..171566b6c7 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -102,7 +102,7 @@ class SpecialSearch extends SpecialPage { /** * Entry point * - * @param string $par + * @param string|null $par */ public function execute( $par ) { $request = $this->getRequest(); @@ -115,7 +115,7 @@ class SpecialSearch extends SpecialPage { // parameter, but also as part of the primary url. This can have PII implications // in releasing page view data. As such issue a 301 redirect to the correct // URL. - if ( strlen( $par ) && !strlen( $term ) ) { + if ( $par !== null && $par !== '' && $term === '' ) { $query = $request->getValues(); unset( $query['title'] ); // Strip underscores from title parameter; most of the time we'll want