I have just installed a fresh copy of **OpenCart 4.1.0.3** on PHP 8.1 with no traffic and no extensions/modules installed.
However, my `error.log` is already filling with warnings and errors, even though this is a clean installation. Examples:
```
PHP Warning: Undefined array key "comment" in /catalog/model/account/returns.php on line 44
Error: Opencart\System\Library\DB::escape(): Argument #1 ($value) must be of type string, null given, called in /catalog/model/account/returns.php on line 44
PHP Warning: unlink(/storage4/cache/cache.language....): No such file or directory in /system/library/cache/file.php on line 37
```
It looks like:
* The `addReturn()` method in `catalog/model/account/returns.php` is not checking if `comment` exists before calling `$this->db->escape()`.
* The cache file deletion process in `system/library/cache/file.php` calls `unlink()` without checking if the file exists first.
Why is this happening on a fresh install, and is there a fix or official patch for this in OpenCart 4.x so it’s fully compatible with PHP 8.1?
Thank you.
Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy.
Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com
Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy.
Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com
Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy.
Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com
Users browsing this forum: ninexus9 and 15 guests