报错位置代码: $status->type = array_pop(explode('\\',$status->type))   (此处$status->type值原本是  APP\Jobs\InboundReportJob)

 

单独的取值 $status->type  以及执行explode('\\',$status->type) 都没有问题  但是explode('\\',$status->type)作为参数执行array_pop则报错;

 

原因:array_pop需要引用传参,因为它修改了数组的内部表示形式;而 explode('\\',$status->type) 本身不能作为变量进行引用(reference);

 

解决方案:  修改代码为

  $arr = explode('\\',$status->type);

  $status->type = array_pop( $arr );

相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-02-28
  • 2022-12-23
相关资源
相似解决方案