diff --git a/sources/MVCFramework.DotEnv.pas b/sources/MVCFramework.DotEnv.pas index cc83fd33..391cf86f 100644 --- a/sources/MVCFramework.DotEnv.pas +++ b/sources/MVCFramework.DotEnv.pas @@ -346,7 +346,16 @@ begin end else begin - if not TryStrToBool(lTmp.Trim, Result) then + lTmp := lTmp.Trim.ToLower; + if (lTmp = 'yes') or (lTmp='1') or (lTmp='true') then + begin + Exit(True); + end; + if (lTmp = 'no') or (lTmp='0') or (lTmp='false') then + begin + Exit(False); + end; + if not TryStrToBool(lTmp, Result) then begin raise EMVCDotEnv.CreateFmt('Env "%s" is not a valid boolean [Current Value: "%s"]', [Name, lTmp]); end;