Skip to content

Commit

Permalink
MDL-44582 installer: added check for php json extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Jetha Chan authored and stronk7 committed Mar 19, 2014
1 parent 84e8be1 commit 3c9535d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions admin/index.php
Expand Up @@ -45,6 +45,13 @@
die();
}

// Make sure php5-json is available.
if (!function_exists('json_encode') || !function_exists('json_decode')) {
// This also shouldn't happen.
echo 'Moodle requires the json PHP extension. Please install or enable the json extension.';
die();
}

define('NO_OUTPUT_BUFFERING', true);

if ((isset($_GET['cache']) and $_GET['cache'] === '0')
Expand Down

0 comments on commit 3c9535d

Please sign in to comment.