Hi,
Can anyone tell me a solution to the below warning?
[13-Jan-2018 15:47:50 Europe/Bucharest] PHP Warning: unlink(.../system/storage/cache/cache.currency.1515849832): No such file or directory in .../system/library/cache/file.php on line 17
Opencart 2.3.0.2
Thank you.
Ant that function is
Code: Select all
public function __construct($expire = 3600) {
$this->expire = $expire;
$files = glob(DIR_CACHE . 'cache.*');
if ($files) {
foreach ($files as $file) {
$time = substr(strrchr($file, '.'), 1);
if ($time < time()) {
if (file_exists($file)) {
unlink($file);
}
}
}
}
}
This error generally just means OpenCart is trying to delete a cache file that has already been deleted (so it no longer exists). It sometimes happens when you have a lot of concurrent connections, so two "delete" commands happen at the same time. It's usually nothing to be concerned about, you can ignore it.
Thank you. How can I make it not show with @ simbol? I like a clean log.
EDIT
Solution
@unlink($file);
EDIT
Solution
@unlink($file);
Fairly early on in my software development career I once asked a more senior developer how I should hide errors. "Fix your code!" was his reply that I never forgotmarius-ciclistu wrote: ↑Tue Jan 16, 2018 11:35 pmThank you. How can I make it not show with @ simbol? I like a clean log.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thank you but I solved it with @ and it is not an error. It's a warning that can't be fixed in busy websites that have a lot of concurent conections.
Who is online
Users browsing this forum: No registered users and 218 guests