1
0
Fork 0

fixes #3976: drop ext/ctype dependency

pull/3978/head
Marc Bennewitz 2015-04-29 21:19:15 +02:00
parent 1cb427ff5c
commit ff1ce78e6b
2 changed files with 1 additions and 10 deletions

View File

@ -369,10 +369,6 @@ EOT
$errors['hash'] = true; $errors['hash'] = true;
} }
if (!extension_loaded('ctype')) {
$errors['ctype'] = true;
}
if (!ini_get('allow_url_fopen')) { if (!ini_get('allow_url_fopen')) {
$errors['allow_url_fopen'] = true; $errors['allow_url_fopen'] = true;
} }
@ -441,11 +437,6 @@ EOT
$text .= "Install it or recompile php without --disable-hash"; $text .= "Install it or recompile php without --disable-hash";
break; break;
case 'ctype':
$text = PHP_EOL."The ctype extension is missing.".PHP_EOL;
$text .= "Install it or recompile php without --disable-ctype";
break;
case 'unicode': case 'unicode':
$text = PHP_EOL."The detect_unicode setting must be disabled.".PHP_EOL; $text = PHP_EOL."The detect_unicode setting must be disabled.".PHP_EOL;
$text .= "Add the following to the end of your `php.ini`:".PHP_EOL; $text .= "Add the following to the end of your `php.ini`:".PHP_EOL;

View File

@ -147,7 +147,7 @@ class ArrayLoader implements LoaderInterface
} }
if (!empty($config['time'])) { if (!empty($config['time'])) {
$time = ctype_digit($config['time']) ? '@'.$config['time'] : $config['time']; $time = preg_match('/^\d+$/D', $config['time']) ? '@'.$config['time'] : $config['time'];
try { try {
$date = new \DateTime($time, new \DateTimeZone('UTC')); $date = new \DateTime($time, new \DateTimeZone('UTC'));