From 11136a92ff6713497f96fdb3d1fbf8f6b2fffd9f Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Mon, 18 Dec 2023 23:47:48 +0100 Subject: [PATCH] piccolo fix in salvataggio valori booleani --- code/app/Services/BaseService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/app/Services/BaseService.php b/code/app/Services/BaseService.php index 380ce4ad..5059c57b 100644 --- a/code/app/Services/BaseService.php +++ b/code/app/Services/BaseService.php @@ -70,7 +70,7 @@ protected function setIfSet($target, array $source, $key, $default = null) protected function boolIfSet($target, array $source, $key, $default = null) { - $target->$key = (isset($source[$key]) && $source[$key] !== false); + $target->$key = (isset($source[$key]) && $source[$key] !== false && $source[$key] !== 0); } protected function transformAndSetIfSet($target, array $source, $key, $transformerFunction)