Skip to content

Commit

Permalink
Merge pull request #47 from stof/patch-1
Browse files Browse the repository at this point in the history
Added a check for the json extension
  • Loading branch information
Seldaek committed Jul 17, 2013
2 parents 619e74d + 97abfea commit 670f56e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/installer
Expand Up @@ -104,6 +104,10 @@ function checkPlatform($quiet)
}
}

if (!function_exists('json_decode')) {
$errors['json'] = true;
}

if (!extension_loaded('Phar')) {
$errors['phar'] = true;
}
Expand Down Expand Up @@ -153,6 +157,11 @@ function checkPlatform($quiet)
out('Make sure that you fix the issues listed below and run this script again:', 'error');
foreach ($errors as $error => $current) {
switch ($error) {
case 'json':
$text = PHP_EOL."The json extension is missing.".PHP_EOL;
$text .= "Install it or recompile php without --disable-json";
break;

case 'phar':
$text = PHP_EOL."The phar extension is missing.".PHP_EOL;
$text .= "Install it or recompile php without --disable-phar";
Expand Down

0 comments on commit 670f56e

Please sign in to comment.