Fixed process cache for bad images when the list is empty
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 26 Oct 2011 21:48:04 +0000 (21:48 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 26 Oct 2011 21:48:04 +0000 (21:48 +0000)
includes/ImageFunctions.php

index aea00da..471465d 100644 (file)
@@ -19,7 +19,7 @@
  * @return bool
  */
 function wfIsBadImage( $name, $contextTitle = false ) {
-       static $badImages = false;
+       static $badImages = null;
        wfProfileIn( __METHOD__ );
 
        # Handle redirects
@@ -35,7 +35,7 @@ function wfIsBadImage( $name, $contextTitle = false ) {
                return $bad;
        }
 
-       if( !$badImages ) {
+       if( $badImages === null ) {
                # Build the list now
                $badImages = array();
                $lines = explode( "\n", wfMsgForContentNoTrans( 'bad_image_list' ) );