From 61bdc1f845a1c91ddc1cfadb720052e815b493cc Mon Sep 17 00:00:00 2001 From: Ollie Read Date: Mon, 27 Aug 2018 14:16:27 +0100 Subject: [PATCH] Use the getAttributes method on insert (#25349) Update the performInsert method to use getAttributes instead of accessing the property directly. --- src/Illuminate/Database/Eloquent/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index 73e1e68a241e..600eda80c64b 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -681,7 +681,7 @@ protected function performInsert(Builder $query) // If the model has an incrementing key, we can use the "insertGetId" method on // the query builder, which will give us back the final inserted ID for this // table from the database. Not all tables have to be incrementing though. - $attributes = $this->attributes; + $attributes = $this->getAttributes(); if ($this->getIncrementing()) { $this->insertAndSetId($query, $attributes);