Skip to content

Commit

Permalink
Merge pull request #11144 from creative-commoners/pulls/5/better-ini-…
Browse files Browse the repository at this point in the history
…checking

ENH Allow all valid true-like ini values
  • Loading branch information
sabina-talipova authored Feb 16, 2024
2 parents 7e30e38 + 8664d2c commit bcbbfdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Core/Cache/DefaultCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ protected function isAPCUSupported()
static $apcuSupported = null;
if (null === $apcuSupported) {
// Need to check for CLI because Symfony won't: https://github.com/symfony/symfony/pull/25080
$apcuSupported = Director::is_cli() ? ini_get('apc.enable_cli') && ApcuAdapter::isSupported() : ApcuAdapter::isSupported();
$apcuSupported = Director::is_cli()
? filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOL) && ApcuAdapter::isSupported()
: ApcuAdapter::isSupported();
}
return $apcuSupported;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Dev/DebugView.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function renderError($httpRequest, $errno, $errstr, $errfile, $errline)
{
$errorType = isset(self::$error_types[$errno]) ? self::$error_types[$errno] : self::$unknown_error;
$httpRequestEnt = htmlentities($httpRequest ?? '', ENT_COMPAT, 'UTF-8');
if (ini_get('html_errors')) {
if (filter_var(ini_get('html_errors'), FILTER_VALIDATE_BOOL)) {
$errstr = strip_tags($errstr ?? '');
} else {
$errstr = Convert::raw2xml($errstr);
Expand Down

0 comments on commit bcbbfdd

Please sign in to comment.