Fix a bug with WebsiteSettings.php

This commit is contained in:
Nikita Petko 2021-12-31 09:54:42 +00:00 committed by Github Enterprise
parent 0857fccd14
commit fd199dc08a
2 changed files with 6 additions and 2 deletions

3
e.php Normal file
View File

@ -0,0 +1,3 @@
<?php
echo (bool)"false";

View File

@ -43,7 +43,7 @@ namespace Alphaland\Web {
case 'float':
return (string) $value;
case 'boolean':
return $value ? 'true' : 'false';
return $value === true ? 'true' : 'false';
case 'array':
return json_encode($value);
default:
@ -65,7 +65,8 @@ namespace Alphaland\Web {
case 'float':
return floatval($value);
case 'boolean':
return boolval($value);
// convert the value to a lowercase value
return strtolower($value) === 'true';
case 'array':
return json_decode($value, true);
default: