From 5b79fd4323760b6568748c0eafbb98e141426c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 15 Aug 2016 20:47:52 +0200 Subject: [PATCH] FIX: ignore enumeration duplicities with null as key --- app/Enumerations/BaseEnumeration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Enumerations/BaseEnumeration.php b/app/Enumerations/BaseEnumeration.php index 356ac390..e7781522 100644 --- a/app/Enumerations/BaseEnumeration.php +++ b/app/Enumerations/BaseEnumeration.php @@ -47,7 +47,7 @@ abstract class BaseEnumeration public static function push($key, $translation, $overwrite = false) { // item exists and we do not want to overwrite items - if (!$overwrite && isset(self::$items[get_called_class()][$key])) { + if (!$overwrite && !is_null($key) && isset(self::$items[get_called_class()][$key])) { throw new EnumerationExistsException(get_called_class() . ': ' . $key . ' already in ' . $translation); }