The if should check $commentText, not $f, which is always set in this branch.
authorPlatonides <platonides@users.mediawiki.org>
Fri, 27 Jan 2012 21:06:00 +0000 (21:06 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 27 Jan 2012 21:06:00 +0000 (21:06 +0000)
maintenance/importImages.php

index 7e4d5e2..bd077ff 100644 (file)
@@ -206,7 +206,7 @@ if ( $count > 0 ) {
                                        echo( " No comment file with extension {$commentExt} found for {$file}, using default comment. " );
                                } else {
                                        $commentText = file_get_contents( $f );
-                                       if ( !$f ) {
+                                       if ( !$commentText ) {
                                                echo( " Failed to load comment file {$f}, using default comment. " );
                                        }
                                }