diff --git a/src/BusinessLogic/Domain/GeneralSettings/Models/Category.php b/src/BusinessLogic/Domain/GeneralSettings/Models/Category.php index d8610263..f767e5fc 100644 --- a/src/BusinessLogic/Domain/GeneralSettings/Models/Category.php +++ b/src/BusinessLogic/Domain/GeneralSettings/Models/Category.php @@ -30,7 +30,7 @@ class Category */ public function __construct(string $id, string $name) { - if (empty($id) || empty($name)) { + if (trim($id) === '' || trim($name) === '') { throw new EmptyCategoryParameterException( new TranslatableLabel('No parameter can be an empty string.', 'general.errors.empty') ); diff --git a/src/BusinessLogic/Domain/OrderStatus/Models/OrderStatus.php b/src/BusinessLogic/Domain/OrderStatus/Models/OrderStatus.php index c5d766e1..e10d7356 100644 --- a/src/BusinessLogic/Domain/OrderStatus/Models/OrderStatus.php +++ b/src/BusinessLogic/Domain/OrderStatus/Models/OrderStatus.php @@ -30,7 +30,7 @@ class OrderStatus */ public function __construct(string $id, string $name) { - if ($id === "" || empty($name)) { + if (trim($id) === '' || trim($name) === '') { throw new EmptyOrderStatusParameterException( new TranslatableLabel('No parameter can be an empty string.', 'general.errors.empty') );