Only variables should be passed by reference
报错位置代码: $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 );
Only variables should be passed by reference的更多相关文章
- 已解决:Strict Standards: Only variables should be passed by reference in
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- Strict Standards: Only variables should be passed by reference
<?php $tag="1 2 3 4 5 6 7"; $tag_sel = array_shift(explode(' ', $tag)); print_r($tag_se ...
- ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法
今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...
- ECshop Strict Standards: Only variables should be passed by reference in解决办法
本文章来给各位同学介绍关于ECshop Strict Standards: Only variables should be passed by reference in解决办法,希望此教程 对各位同 ...
- [php-error-report]PHP Strict Standards: Only variables should be passed by reference
// 报错代码:PHP Strict Standards: Only variables should be passed by reference $arr_userInfo['im_nation_ ...
- php Only variables can be passed by reference
最近做项目,发现了一个报错 Only variables can be passed by reference, 意思是"只有变量能通过'引用'" 就是在代码中 使用了一个方法 ...
- Ecshop提示Only variables should be passed by reference in错误
Ecshop是个坑爹货,为什么tiandi会说它是个坑爹货呢,请看一下下面的官方的运行环境推荐: 服务器端运行环境推荐·php版本5.0以上5.3以下的版本(推荐使用5.2系列版本)·Mysql版本5 ...
- 出现Strict Standards: Only variables should be passed by reference in的解决方法
出现Strict Standards: Only variables should be passed by reference in的解决方法 代码报错: <br /><b> ...
- php报警:Strict Standards: Only variables should be passed by reference in
错误原因 因为end函数的原因. end函数: mixed end ( array &$array ) 你可以看到end的参数是一个引用(reference),而你只能把一个变量的引 ...
随机推荐
- new Date() 对象及方法:
在别人的代码中见了两回 new Date().toLocaleString(),查了才知道,toLocaleString()是 根据本地时间格式,把 Date 对象转换为字符串.于是好奇new Dat ...
- Java 实现Excel的简单读取操作
JAVA实现Excel表单的简单读取操作 实现Excel表单的简单读取操作,首先要导入相关的jar包: 如图所示: 此处贴上代码: public static List<List<Stri ...
- pandas入门(1)
import pandas as pd import numpy as np # 自动创建索引 obj = pd.Series([4, 7, -5, 2]) print(obj, type(obj)) ...
- Varint数值压缩存储方法
coming from http://www.cnblogs.com/smark/archive/2012/05/03/2480034.html 在编写网络通讯的时候我们经常需要把一些数据存储到byt ...
- [Python3 填坑] 009 深拷贝与浅拷贝
目录 1. print( 坑的信息 ) 2. 开始填坑 2.1 Python3.7 官方文档 2.2 赋值.切片与 copy() 分析 分析 分析 分析 2.3 copy 模块 分析 分析 2.4 小 ...
- CentOS7 修复boot目录
这里为了达到实验目的,首先删除boot目录下所有内容 重启后发现系统进不去了,这正是我们想要的 进入系统救援模式,以重新引导系统 进入救援模式后,输入以下命令进行修复boot目录 重启后,能正常引导系 ...
- ubuntu开机只有一条横杠在闪的解决办法
1.制作U盘启动盘,并试用ubuntu 2.输入以下命令,根据提示完成修复 sudo add-apt-repository ppa:yannubuntu/boot-repair && ...
- jQuery难学是因为什么?
我们看别人写的js代码,发现很多不明白,其实只是你对语法不清楚.对函数方法了解的不全面. /****************************************************** ...
- C#传特定的值,获得特定的数组排序
一,在实际业务中,我们会有当我们传任何值进来时,我们要有特定的排序,,比如传进来的是"生物", "历史","化学", 但实际上我们需要的是& ...
- 2018-9-1-win10-17025-触摸bug
title author date CreateTime categories win10 17025 触摸bug lindexi 2018-09-01 09:50:18 +0800 2018-2-1 ...