ubuntu - ErrorException 为 foreach() 提供的参数无效 - LAMP 堆栈
问题描述
$settings = $this->post('settings', ['data' => ['all' => true]]);
foreach ($settings as $k => $v) {
if ($k == "payment_methods") {
Cache::put('payment_methods', json_decode($v));
} elseif ($k == "front_end_settings") {
$frontEndSettings = \json_decode($v);
foreach ($frontEndSettings as $k1 => $v1) {
Cache::put($k1, $v1);
}
} elseif ($k == "time_slot_config") {
$v = \json_decode($v);
if (($v->is_time_slots_enabled ?? 0) == 1) {
if (($v->time_slot_config ?? 0) == 1) { ...
我正在尝试为使用 LAMP 堆栈开发的名为 eCart 的电子商务工作应用程序托管此购买的 UI。我收到这个错误Invalid argument supplied for foreach()
。我不确定这里可能是什么问题
解决方案
推荐阅读
- mysql - Mysql-Workbench 表浏览器窗格丢失
- python-2.7 - 从其他目录调用 python 脚本函数
- java - 如何将mongodb视图与pageable和querydsl结合起来?
- sql - SQL 将行转换为列并填充值
- java - setOnClickListener Android Studio(制作计数器)
- javascript - 通过代理的 Google Places API 超时
- cypress - 比较赛普拉斯中的动态文本
- reactjs - 在反应图中具有相同x轴的多个y轴值
- javascript - 如何根据字段是否存在对 MongoDB 集合进行排序
- python - 子类 __init__ 中 PyMissingConstructor 的 PyCharm 警告,但超类没有 __init__