Opencart 3.02
Just upgraded PHP to 7.4
I read that a change to PHP 7.4 is Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice.
Now getting this error
PHP Notice: Trying to access array offset on value of type bool in /storage/modification/catalog/controller/startup/startup.php on line 199
This is lines 198 - 202
if (isset($this->session->data['payment_address'])) {
$this->tax->setPaymentAddress($this->session->data['payment_address']['country_id'], $this->session->data['payment_address']['zone_id']);
} elseif ($this->config->get('config_tax_default') == 'payment') {
$this->tax->setPaymentAddress($this->config->get('config_country_id'), $this->config->get('config_zone_id'));
}
What is the best way to solve this and other null values
Is it better to upgrade to PHP 8 or will there be more issues
If you don't have custom modification in code you can upgrade to 3.0.3.8 Maintenance branch
https://github.com/opencart/opencart/tr ... aintenance
If you don't upgrade, here is the fix
https://github.com/opencart/opencart/bl ... p.php#L187
https://github.com/opencart/opencart/tr ... aintenance
If you don't upgrade, here is the fix
https://github.com/opencart/opencart/bl ... p.php#L187
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Please, OpenCart version numbers are not complex, at least get that bit right.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: No registered users and 17 guests