laynefyc / php-monitor

A free, flexible, powerful tool that helps you monitor PHP Service and profiling PHP code.
231 stars 31 forks source link

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

Open jyiL opened 2 years ago

jyiL commented 2 years ago
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 commented 1 year ago

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

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