mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6651 from zanderwar/patch-1
Added check for register_argc_argv
This commit is contained in:
commit
9da8413ad8
@ -125,6 +125,15 @@ ENVCONTENT;
|
||||
}
|
||||
DB::connect($databaseConfig);
|
||||
|
||||
// register_argc_argv: Tells PHP whether to declare the argv & argc variables (that would contain the GET information)
|
||||
// http://php.net/manual/en/ini.core.php#ini.register-argc-argv
|
||||
if (!(int)ini_get('register_argc_argv')) {
|
||||
echo 'register_argc_argv is required to obtain the GET information but is disabled.'
|
||||
.'Please enable it in your php.ini ('
|
||||
. php_ini_loaded_file()
|
||||
.')';
|
||||
die();
|
||||
}
|
||||
|
||||
// Get the request URL from the querystring arguments
|
||||
$url = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : null;
|
||||
|
Loading…
Reference in New Issue
Block a user