Use instanceof in ParserCache::getKey to help IDEs
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Jun 2015 21:09:20 +0000 (14:09 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 10 Jun 2015 21:09:20 +0000 (14:09 -0700)
Change-Id: I772f53ee28ade5da499fe05259a17fed5cc52adb

includes/parser/ParserCache.php

index 98d3f7f..16dde0d 100644 (file)
@@ -141,7 +141,7 @@ class ParserCache {
 
                // Determine the options which affect this article
                $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
 
                // Determine the options which affect this article
                $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
-               if ( $optionsKey != false ) {
+               if ( $optionsKey instanceof CacheTime ) {
                        if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
                                wfIncrStats( "pcache.miss.expired" );
                                $cacheTime = $optionsKey->getCacheTime();
                        if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
                                wfIncrStats( "pcache.miss.expired" );
                                $cacheTime = $optionsKey->getCacheTime();