mirror of
https://github.com/getgrav/grav.git
synced 2026-02-26 00:21:31 +01:00
Fix syntax error in PHP 5.3. Move the version check before requiring the autoloaded deps
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fix for double extensions getting added during some redirects [#1307](https://github.com/getgrav/grav/issues/1307)
|
||||
* Fix syntax error in PHP 5.3. Move the version check before requiring the autoloaded deps
|
||||
|
||||
# v1.1.16
|
||||
## 02/10/2017
|
||||
@@ -17,7 +18,7 @@
|
||||
* Various code cleanups (return types, missing variables in doclbocks, etc.)
|
||||
1. [](#bugfix)
|
||||
* Fix blueprints slug validation [https://github.com/getgrav/grav-plugin-admin/issues/955](https://github.com/getgrav/grav-plugin-admin/issues/955)
|
||||
|
||||
|
||||
# v1.1.15
|
||||
## 01/30/2017
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
namespace Grav;
|
||||
define('GRAV_PHP_MIN', '5.5.9');
|
||||
|
||||
// Ensure vendor libraries exist
|
||||
$autoload = __DIR__ . '/vendor/autoload.php';
|
||||
@@ -23,13 +24,13 @@ if (PHP_SAPI == 'cli-server') {
|
||||
use Grav\Common\Grav;
|
||||
use RocketTheme\Toolbox\Event\Event;
|
||||
|
||||
// Register the auto-loader.
|
||||
$loader = require_once $autoload;
|
||||
|
||||
if (version_compare($ver = PHP_VERSION, $req = GRAV_PHP_MIN, '<')) {
|
||||
die(sprintf('You are running PHP %s, but Grav needs at least <strong>PHP %s</strong> to run.', $ver, $req));
|
||||
}
|
||||
|
||||
// Register the auto-loader.
|
||||
$loader = require_once $autoload;
|
||||
|
||||
// Set timezone to default, falls back to system if php.ini not set
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
@@ -50,6 +51,6 @@ $grav = Grav::instance(
|
||||
try {
|
||||
$grav->process();
|
||||
} catch (\Exception $e) {
|
||||
$grav->fireEvent('onFatalException', new Event(['exception' => $e]));
|
||||
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.1.16');
|
||||
define('GRAV_TESTING', false);
|
||||
define('DS', '/');
|
||||
define('GRAV_PHP_MIN', '5.5.9');
|
||||
|
||||
// Directories and Paths
|
||||
if (!defined('GRAV_ROOT')) {
|
||||
|
||||
Reference in New Issue
Block a user