diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/src/Illuminate/Database/Eloquent/Relations/MorphTo.php index 2f449876fac7..e21764131f72 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphTo.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -164,7 +164,7 @@ protected function gatherKeysByType($type, $keyType) ? array_keys($this->dictionary[$type]) : array_map(function ($modelId) { return (string) $modelId; - }, array_filter(array_keys($this->dictionary[$type]))); + }, array_keys($this->dictionary[$type])); } /**