commit
ac524e9bf3
|
@ -279,7 +279,7 @@ class ClassLoader
|
||||||
*/
|
*/
|
||||||
public function setApcuPrefix($apcuPrefix)
|
public function setApcuPrefix($apcuPrefix)
|
||||||
{
|
{
|
||||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -481,7 +481,7 @@ EOT
|
||||||
$errors['iconv_mbstring'] = true;
|
$errors['iconv_mbstring'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ini_get('allow_url_fopen')) {
|
if (!filter_var(ini_get('allow_url_fopen'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$errors['allow_url_fopen'] = true;
|
$errors['allow_url_fopen'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ EOT
|
||||||
$warnings['openssl_version'] = true;
|
$warnings['openssl_version'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) {
|
if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$warnings['apc_cli'] = true;
|
$warnings['apc_cli'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ EOT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ini_get('xdebug.profiler_enabled')) {
|
if (filter_var(ini_get('xdebug.profiler_enabled'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$warnings['xdebug_profile'] = true;
|
$warnings['xdebug_profile'] = true;
|
||||||
} elseif (extension_loaded('xdebug')) {
|
} elseif (extension_loaded('xdebug')) {
|
||||||
$warnings['xdebug_loaded'] = true;
|
$warnings['xdebug_loaded'] = true;
|
||||||
|
|
|
@ -255,7 +255,7 @@ class Compiler
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Avoid APC causing random fatal errors per https://github.com/composer/composer/issues/264
|
// Avoid APC causing random fatal errors per https://github.com/composer/composer/issues/264
|
||||||
if (extension_loaded('apc') && ini_get('apc.enable_cli') && ini_get('apc.cache_by_default')) {
|
if (extension_loaded('apc') && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.cache_by_default'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
if (version_compare(phpversion('apc'), '3.0.12', '>=')) {
|
if (version_compare(phpversion('apc'), '3.0.12', '>=')) {
|
||||||
ini_set('apc.cache_by_default', 0);
|
ini_set('apc.cache_by_default', 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -41,7 +41,7 @@ class ErrorHandler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ini_get('xdebug.scream')) {
|
if (filter_var(ini_get('xdebug.scream'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$message .= "\n\nWarning: You have xdebug.scream enabled, the warning above may be".
|
$message .= "\n\nWarning: You have xdebug.scream enabled, the warning above may be".
|
||||||
"\na legitimately suppressed error that you were not supposed to see.";
|
"\na legitimately suppressed error that you were not supposed to see.";
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@ class RemoteFilesystem
|
||||||
}
|
}
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
if ($errorMessage && !ini_get('allow_url_fopen')) {
|
if ($errorMessage && !filter_var(ini_get('allow_url_fopen'), FILTER_VALIDATE_BOOLEAN)) {
|
||||||
$errorMessage = 'allow_url_fopen must be enabled in php.ini ('.$errorMessage.')';
|
$errorMessage = 'allow_url_fopen must be enabled in php.ini ('.$errorMessage.')';
|
||||||
}
|
}
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
Loading…
Reference in New Issue