在执行 select()查询后进行foreach遍历会出现
Indirect modification of overloaded element of think\Collection has no effect
这个报错 是因为 select()查询出来的是 对象 需要把select()查询对象转成数组 toArray()一下

报错:
TP 6.报错 Indirect modification of overloaded element of think\Collection has no effect
报错代码:
TP 6.报错 Indirect modification of overloaded element of think\Collection has no effect
正确代码:
TP 6.报错 Indirect modification of overloaded element of think\Collection has no effect

相关文章:

  • 2022-12-23
  • 2021-11-16
  • 2021-07-17
  • 2021-09-28
  • 2021-10-11
  • 2022-01-04
  • 2021-10-29
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案