I discovered a bug in admin/controller/common/home.php file.
Find:
Code: Select all
if (!file_exists($file)) {
$this->data['errorlogs'] = sprintf($this->language->get('error_logs'). DIR_LOGS);
} else {
$this->data['error_logs'] = '';
unlink($file);
}
Code: Select all
if (!file_exists($file)) {
$this->data['error_logs'] = sprintf($this->language->get('error_logs'). DIR_LOGS, $file);
} else {
$this->data['error_logs'] = '';
unlink($file);
}
1 - From error_reporting (when executing manually), the 'errorlogs' key from $this->data will never be returned so the index will be undefined.
2 - The sprintf command requires two switch cases and not a single one. A sprintf server error message will be returned even though the error_reporting is disabled. The missing case was the $file variable.
Then, not a big issue, but your language output error_logs key returns one sentence at the end of the '!' mark.
In admin/language/english/common/home.php file,
find:
Code: Select all
$_['error_logs'] = 'Warning: Log directory %snot writeable!';
Code: Select all
$_['error_logs'] = 'Warning: Log directory %snot writeable! ';