mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #11144 from creative-commoners/pulls/5/better-ini-checking
ENH Allow all valid true-like ini values
This commit is contained in:
commit
bcbbfddd1a
@ -106,7 +106,9 @@ class DefaultCacheFactory implements CacheFactory
|
|||||||
static $apcuSupported = null;
|
static $apcuSupported = null;
|
||||||
if (null === $apcuSupported) {
|
if (null === $apcuSupported) {
|
||||||
// Need to check for CLI because Symfony won't: https://github.com/symfony/symfony/pull/25080
|
// 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;
|
return $apcuSupported;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ class DebugView
|
|||||||
{
|
{
|
||||||
$errorType = isset(self::$error_types[$errno]) ? self::$error_types[$errno] : self::$unknown_error;
|
$errorType = isset(self::$error_types[$errno]) ? self::$error_types[$errno] : self::$unknown_error;
|
||||||
$httpRequestEnt = htmlentities($httpRequest ?? '', ENT_COMPAT, 'UTF-8');
|
$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 ?? '');
|
$errstr = strip_tags($errstr ?? '');
|
||||||
} else {
|
} else {
|
||||||
$errstr = Convert::raw2xml($errstr);
|
$errstr = Convert::raw2xml($errstr);
|
||||||
|
Loading…
Reference in New Issue
Block a user