From 6e7201d1797c73844a524976b3b08138d2d46c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 29 Dec 2022 09:25:18 +0100 Subject: [PATCH] Upgrade framework lib --- app/controllers/api/avatars.php | 2 +- app/controllers/api/functions.php | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index b3768d51a7..cac4e5c21c 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -314,7 +314,7 @@ App::get('/v1/avatars/qr') ->param('download', false, new Boolean(true), 'Return resulting image with \'Content-Disposition: attachment \' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.', true) ->inject('response') ->action(function (string $text, int $size, int $margin, mixed $download, Response $response) { - $download = in_array($download, ['1', 'true', 1, true], true); + $download = in_array($download, ['true', true], true); $options = new QROptions([ 'addQuietzone' => true, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 3ab4171d71..0f54cd8865 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -611,7 +611,7 @@ App::post('/v1/functions/:functionId/deployments') ->inject('deviceFunctions') ->inject('deviceLocal') ->action(function (string $functionId, string $entrypoint, mixed $code, mixed $activate, Request $request, Response $response, Database $dbForProject, Event $events, Document $project, Device $deviceFunctions, Device $deviceLocal) { - $activate = in_array($activate, ['1', 'true', 1, true], true); + $activate = in_array($activate, ['true', true], true); $function = $dbForProject->getDocument('functions', $functionId); diff --git a/composer.json b/composer.json index 8e22745c76..9d9cde0cb4 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/database": "0.28.*", "utopia-php/preloader": "0.2.*", "utopia-php/domains": "1.1.*", - "utopia-php/framework": "0.25.*", + "utopia-php/framework": "dev-fix-loose-booleans as 0.26.0", "utopia-php/image": "0.5.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.3.*",