Merge "Fix order of @var parameter in PHP"
[lhc/web/wiklou.git] / includes / search / SearchSqlite.php
index 0bc2d37..c304797 100644 (file)
@@ -137,12 +137,12 @@ class SearchSqlite extends SearchDatabase {
                } else {
                        // For Chinese, words may legitimately abut other words in the text literal.
                        // Don't add \b boundary checks... note this could cause false positives
-                       // for latin chars.
+                       // for Latin chars.
                }
                return $regex;
        }
 
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard
@@ -199,7 +199,7 @@ class SearchSqlite extends SearchDatabase {
                if ( is_null( $this->namespaces ) ) {
                        return '';  # search all
                }
-               if ( !count( $this->namespaces ) ) {
+               if ( $this->namespaces === [] ) {
                        $namespaces = '0';
                } else {
                        $namespaces = $this->db->makeList( $this->namespaces );