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. mwstore://local-backend/local-public/8/85/test.pdf
if ( !$path ) {
- does not happen as path is set
$this->output( "{$row->img_name}: not locally accessible\n" );
continue;
}
$stat = stat( $file->getPath() );
stat returns FALSE meaning: error. Reason is that it did not get an actual file path, but this internal identifier: stat(mwstore://local-backend/local-public/8/85/test.pdf);
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...
Version: 1.22.3
Severity: normal