apiship / opencart-module Goto Github PK
View Code? Open in Web Editor NEWApiShip - модуль доставки для Opencart 3.x, Opencart 2.3 и Opencart 2.1
Home Page: https://t.me/apiship_chat/2534
License: MIT License
ApiShip - модуль доставки для Opencart 3.x, Opencart 2.3 и Opencart 2.1
Home Page: https://t.me/apiship_chat/2534
License: MIT License
Opencart 3.x, PHP 7.4
Имею много нотисов:
PHP Notice: Trying to access array offset on value of type null in /storage/modification/catalog/controller/checkout/simplecheckout_shipping.php on line 221
Открываем файл и видим код, добавленный модулем Apiship:
$code = $this->_templateData['shipping_method']['code'];
В PHP 7.4 и выше были введены более строгие проверки типов для переменных, потому надо убедиться, что
$this->_templateData['shipping_method']
действительно инициализирована и является массивом перед тем, как пытаться получить из нее данные.
Решение:
// Убедитесь, что 'shipping_method' существует и является массивом, прежде чем пытаться получить 'code' if (is_array($this->_templateData['shipping_method']) && isset($this->_templateData['shipping_method']['code'])) { $code = $this->_templateData['shipping_method']['code']; } else { // Можно установить код ошибки или обработать эту ситуацию соответствующим образом $code = null; // или любое другое значение по умолчанию, которое имеет смысл }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.