错误:获取“未定义的数组密钥” Whule在开放式购物车中运行我的应用程序
我的代码:
$data['components'][] = array(
'id_component' => $component['id_component'],
'id_layout' => $component['id_layout'],
'component_type' => $this->model_webservice_webservice->getComponentTypeByID($component['id_component_type']),
'component_heading' => @$component['component_heading'],
'data' => $component_data,
'product_data' => $products
);
错误行: 'component_heading'=> @$ component ['component_heading'],
错误:未定义的阵列键“ component_heading” c:\ xampp \ xampp \ htdocs *** \ extension \ extension \ extension \ module \ WebService.php在第1870年的线路上:
MY CODE :
$data['components'][] = array(
'id_component' => $component['id_component'],
'id_layout' => $component['id_layout'],
'component_type' => $this->model_webservice_webservice->getComponentTypeByID($component['id_component_type']),
'component_heading' => @$component['component_heading'],
'data' => $component_data,
'product_data' => $products
);
ERROR LINE :
'component_heading' => @$component['component_heading'],
ERROR : Undefined array key "component_heading" in C:\xampp\htdocs***\extension\module\webservice.php on line 1870Warning:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
避免使用错误抑制操作员(行为自PHP8以来已更改
您可以使用。您可以使用 。当没有这样的关键时,以下语法之一:
Avoid using Error Suppression operator (it's behaviour has changed since PHP8.
You can use one of following syntaxes when there is no such key: