Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c21e3d4 + 614d8aa commit 0464fe3Copy full SHA for 0464fe3
1 file changed
src/Illuminate/Database/Eloquent/Model.php
@@ -2157,7 +2157,7 @@ public function attributesToArray()
2157
// formatting while accessing attributes vs. arraying / JSONing a model.
2158
foreach ($this->getDates() as $key)
2159
{
2160
- if ( ! array_key_exists($key, $attributes)) continue;
+ if ( ! isset($attributes[$key])) continue;
2161
2162
$attributes[$key] = (string) $this->asDateTime($attributes[$key]);
2163
}
0 commit comments