Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

php 7.4数据库迁移最后一步有错误提示 #18

Open
womengnan opened this issue Apr 28, 2020 · 0 comments
Open

php 7.4数据库迁移最后一步有错误提示 #18

womengnan opened this issue Apr 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@womengnan
Copy link

womengnan commented Apr 28, 2020

[InvalidArgumentException] There was a problem creating the schema table: SQLSTATE[42000]: Syntax erro r or access violation: 1067 Invalid default value for 'end_time'

xampp可以通过修改my.ini:
my.ini 接下來搜尋 sql_mode,將原本的 sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION 修改成 sql_mode= 然後重啟即可解決~

对于php7.4仍有以下提示:

[think\exception\ErrorException] Trying to access array offset on value of type null

估计是:有个地方在访问数组元素,而数组本身却是null。在Php这种弱类型语言中这种语法一般是支持的,它会整体返回null,而在新版的Php7.4中这个语法却会报告为错误。

不知道如何修改

@womengnan womengnan changed the title php 7.4迁移最后一步有错误提示 php 7.4数据库迁移最后一步有错误提示 Apr 28, 2020
@QThans QThans added the bug Something isn't working label Jul 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants