Update psy/psysh 0.8.1 -> 0.8.3
[lhc/web/wiklou.git] / languages / LanguageConverter.php
index 361a9a7..6286a2b 100644 (file)
@@ -380,6 +380,7 @@ class LanguageConverter {
                $literalBlob = '';
 
                // Guard against delimiter nulls in the input
+               // (should never happen: see T159174)
                $text = str_replace( "\000", '', $text );
 
                $markupMatches = null;
@@ -844,9 +845,8 @@ class LanguageConverter {
         * @throws MWException
         */
        function loadDefaultTables() {
-               $name = get_class( $this );
-
-               throw new MWException( "Must implement loadDefaultTables() method in class $name" );
+               $class = static::class;
+               throw new MWException( "Must implement loadDefaultTables() method in class $class" );
        }
 
        /**
@@ -865,12 +865,9 @@ class LanguageConverter {
                $this->mTables = false;
                $cache = ObjectCache::getInstance( $wgLanguageConverterCacheType );
                if ( $fromCache ) {
-                       wfProfileIn( __METHOD__ . '-cache' );
                        $this->mTables = $cache->get( $this->mCacheKey );
-                       wfProfileOut( __METHOD__ . '-cache' );
                }
                if ( !$this->mTables || !array_key_exists( self::CACHE_VERSION_KEY, $this->mTables ) ) {
-                       wfProfileIn( __METHOD__ . '-recache' );
                        // not in cache, or we need a fresh reload.
                        // We will first load the default tables
                        // then update them using things in MediaWiki:Conversiontable/*
@@ -884,7 +881,6 @@ class LanguageConverter {
                        $this->mTables[self::CACHE_VERSION_KEY] = true;
 
                        $cache->set( $this->mCacheKey, $this->mTables, 43200 );
-                       wfProfileOut( __METHOD__ . '-recache' );
                }
        }