From b9653c5abd33c2e0d46bc3abdbe5aae673304306 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 20 Feb 2018 19:11:33 +0100 Subject: [PATCH] fix company-required check for good now :P Signed-off-by: Michael Kaufmann (d00p) --- lib/classes/api/commands/class.Customers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/api/commands/class.Customers.php b/lib/classes/api/commands/class.Customers.php index 5cbaddb4..29acb6ff 100644 --- a/lib/classes/api/commands/class.Customers.php +++ b/lib/classes/api/commands/class.Customers.php @@ -97,7 +97,7 @@ class Customers extends ApiCommand implements ResourceEntity $name = $this->getParam('name', true, ''); $firstname = $this->getParam('firstname', true, ''); $company_required = (! empty($name) && empty($firstname)) || (empty($name) && ! empty($firstname)) || (empty($name) && empty($firstname)); - $company = $this->getParam('company', $company_required, ''); + $company = $this->getParam('company', ($company_required ? false : true), ''); $street = $this->getParam('street', true, ''); $zipcode = $this->getParam('zipcode', true, ''); $city = $this->getParam('city', true, '');