Bug ID: 62148
           Summary: Maintenance script checkImages.php does not work
           Product: MediaWiki
           Version: 1.22.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Maintenance scripts
       Web browser: ---
   Mobile Platform: ---

The maintenance script checkImages.php currently only reports, that files would
be missing:

 test.pdf: missing

This output is repeated for every file; the statistic at the end finally says: 

However, this is wrong: The problem is that in checkImages.php around line 57
stat is called with a wrong parameter.

This is the code, comments by me:
$path = $file->getPath();
# $path is set to an internal path identifier, e.g.
if ( !$path ) {
    # does not happen as path is set
    $this->output( "{$row->img_name}: not locally accessible\n" );
$stat = stat( $file->getPath() );
# stat returns FALSE meaning: error. Reason is that it did not get an actual
file path, but this internal identifier:
if ( !$stat ) {
    $this->output( "{$row->img_name}: missing\n" );

stat() however SHOULD be called with the real path to the file. That should fix
the problem...

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to