Call to a member function assign() on null
在null上调用成员函数赋值()
子类的构造函数覆盖了父类的,所以报错了。
- 将__construct()改为_initialize()
public function __construct(){ parent::__construct(); }
public function __construct(){ parent::__initialize(); }
A non well formed numeric value encountered
遇到格式不正确的数值
我的场景为:在数据库中存入获取到数值,原始数值的类型为localdatetime,在使用tp5渲染模板时遇到此问题。
解决方法:修改database中的字段
更新:auto_timestamp不能更改,只需要更改detetime_format的值即可。更改auto_timestamp字段可能会造成在进行软删除时出现时间戳不能写入的情况。
Integrity constraint violation: 1052 Column 'id' in order clause is ambiguou
错误场景:
问题在where条件中的id,意思是系统找不到这个id是哪个表的,需要在前面加上表名。