Skip to content

Commit

Permalink
Fix Relation::morphMap() merge (issue #21457). (#21458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Víctor Díaz authored and taylorotwell committed Sep 29, 2017
1 parent 86abc06 commit cea8d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Relations/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public static function morphMap(array $map = null, $merge = true)

if (is_array($map)) {
static::$morphMap = $merge && static::$morphMap
? array_merge(static::$morphMap, $map) : $map;
? $map + static::$morphMap : $map;
}

return static::$morphMap;
Expand Down

0 comments on commit cea8d01

Please sign in to comment.