From 00203789bc1699d98e9a82a720acee6564182eab Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 10 Jul 2016 15:53:04 +0200 Subject: [PATCH] Replaced empty function with comparison to null because 'false' values are counted as empty. --- src/engine/Api/V1/Parsers/Providers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/Api/V1/Parsers/Providers.php b/src/engine/Api/V1/Parsers/Providers.php index df888484..7e4635ee 100644 --- a/src/engine/Api/V1/Parsers/Providers.php +++ b/src/engine/Api/V1/Parsers/Providers.php @@ -123,12 +123,12 @@ class Providers implements ParsersInterface { $decodedRequest['settings']['password'] = $request['settings']['password']; } - if (!empty($request['settings']['notifications'])) { + if ($request['settings']['notifications'] !== null) { $decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'], FILTER_VALIDATE_BOOLEAN); } - if (!empty($request['settings']['googleSync'])) { + if ($request['settings']['googleSync'] !== null) { $decodedRequest['settings']['google_sync'] = filter_var($request['settings']['googleSync'], FILTER_VALIDATE_BOOLEAN); }