summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-09-14 08:33:37 +0200
committerAleksander Machniak <alec@alec.pl>2012-09-14 08:35:50 +0200
commit3e2a06c6838af0e85f2ebb3e98748afb8f81cdca (patch)
tree4b80e9d207354fc87166dd72993861c68ec87af3 /installer
parent295efea5c114378f9c5509659badb18ff16b0642 (diff)
Move date.timezone check to 'required' block, add date.timezone value validation
Conflicts: installer/check.php
Diffstat (limited to 'installer')
-rw-r--r--installer/check.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/installer/check.php b/installer/check.php
index e5f30261c..5cb30225e 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -42,10 +42,12 @@ $ini_checks = array(
'suhosin.session.encrypt' => 0,
'magic_quotes_runtime' => 0,
'magic_quotes_sybase' => 0,
+ 'date.timezone' => '-NOTEMPTY-',
);
$optional_checks = array(
- 'date.timezone' => '-NOTEMPTY-',
+ // required for utils/modcss.inc, should we require this?
+ 'allow_url_fopen' => 1,
);
$source_urls = array(
@@ -170,7 +172,15 @@ foreach ($ini_checks as $var => $val) {
$status = ini_get($var);
if ($val === '-NOTEMPTY-') {
if (empty($status)) {
- $RCI->fail($var, "cannot be empty and needs to be set");
+ $RCI->fail($var, "empty value detected");
+ } else if ($var == 'date.timezone') {
+ try {
+ $tz = new DateTimeZone($status);
+ $RCI->pass($var);
+ }
+ catch (Exception $e) {
+ $RCI->fail($var, "invalid value detected");
+ }
} else {
$RCI->pass($var);
}