Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php5.6使用mysql保存数据出错 #23

Open
jyiL opened this issue Jan 12, 2022 · 1 comment
Open

php5.6使用mysql保存数据出错 #23

jyiL opened this issue Jan 12, 2022 · 1 comment

Comments

@jyiL
Copy link

jyiL commented Jan 12, 2022

PHP 5.6.38 (cli) (built: Oct 15 2018 15:54:36)

doctrine/inflector         v1.1.0  Common String Manipulations with regard to casing and singular/plural rules.
illuminate/container       v5.4.36 The Illuminate Container package.
illuminate/contracts       v5.4.36 The Illuminate Contracts package.
illuminate/database        v5.4.36 The Illuminate Database package.
illuminate/events          v5.4.36 The Illuminate Events package.
illuminate/pagination      v5.4.36 The Illuminate Pagination package.
illuminate/support         v5.4.36 The Illuminate Support package.
jenssegers/mongodb         v2.3.5  A MongoDB based Eloquent model and Query builder for Laravel 4
kylekatarnls/update-helper 1.2.1   Update helper
nesbot/carbon              1.39.1  A simple API extension for DateTime.
paragonie/random_compat    v2.0.20 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
symfony/polyfill-mbstring  v1.19.0 Symfony polyfill for the Mbstring extension
symfony/translation        v3.4.47 Symfony Translation Component


[12-Jan-2022 11:09:12 PRC] PHP Warning:  Missing argument 2 for Illuminate\Database\Eloquent\Model::setAttribute(), called in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 519 and defined in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 511
[12-Jan-2022 11:09:12 PRC] PHP Notice:  Undefined variable: value in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 519

pm\model\common\TraitModel
用save方法保存数据出错了

@MrCui
Copy link

MrCui commented Feb 3, 2023

https://github.com/illuminate/database/blob/ac9ae2d82b8a6137400f17b3eea258be3518daa9/Eloquent/Concerns/HasTimestamps.php#L45

illuminate/database 高版本判断了 create_at是否为null, 而低版本没有, 可能是个bug, 所以高版本修复了, 你看看是否是这个原因.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants