Skip to content

Commit ad1e965

Browse files
committed
fix(upgrade): report template read failures accurately
Use the upgrade file-access error when mainfile.dist.php cannot be read in Upgrade_230::write_mainfile() instead of reporting a mainfile write failure. This makes upgrader diagnostics clearer when the template file is missing or unreadable.
1 parent 8235c7f commit ad1e965

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

upgrade/upd-2.0.18-to-2.3.0/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public function write_mainfile($vars)
418418

419419
$lines = file($file);
420420
if (false === $lines) {
421-
echo ERR_COULD_NOT_WRITE_MAINFILE;
421+
echo sprintf(defined('_FILE_ACCESS_ERROR') ? _FILE_ACCESS_ERROR : 'Could not access the file %s', basename($file));
422422

423423
return false;
424424
}

0 commit comments

Comments
 (0)