SP在PHP5.5.12下保存没有自增字段的数据有报错,求解,谢谢
发布于:2022-01-17 09:50:54
#1 jeffrey_shou
$rc_crud=$lib_group->create($rowNew);
if ($rc_crud)$this->success("组添加成功!", spUrl("group","create"));
else $this->error("组添加失败!".",请返回检查,或与系统管理员联系!");
报错的是spModel第139行: return array_pop( $this->find($row, "{$this->pk} DESC",$this->pk) );
2015-08-01 16:27:57
#2 jeffrey_shou
参考php5.5.12手册,已解决,给碰到过类似问题的朋友个帮助:修改spModel.php 139行
$array = $this->find($row, "{$this->pk} DESC",$this->pk);
return array_pop($array);
2015-08-01 16:46:30
#3 jake
PHP5.1就有strict模式了,一般正常的环境都不会开那个的。请留意下。
2015-08-01 20:57:27