Replaced empty function with comparison to null because 'false' values are counted as empty.

This commit is contained in:
Alex Tselegidis 2016-07-10 15:53:04 +02:00
parent a0680db34d
commit 00203789bc

View file

@ -123,12 +123,12 @@ class Providers implements ParsersInterface {
$decodedRequest['settings']['password'] = $request['settings']['password']; $decodedRequest['settings']['password'] = $request['settings']['password'];
} }
if (!empty($request['settings']['notifications'])) { if ($request['settings']['notifications'] !== null) {
$decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'], $decodedRequest['settings']['notifications'] = filter_var($request['settings']['notifications'],
FILTER_VALIDATE_BOOLEAN); FILTER_VALIDATE_BOOLEAN);
} }
if (!empty($request['settings']['googleSync'])) { if ($request['settings']['googleSync'] !== null) {
$decodedRequest['settings']['google_sync'] = filter_var($request['settings']['googleSync'], $decodedRequest['settings']['google_sync'] = filter_var($request['settings']['googleSync'],
FILTER_VALIDATE_BOOLEAN); FILTER_VALIDATE_BOOLEAN);
} }