mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG FIX: The 5.1 replacement array_fill_keys function now made available to the cron jobs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97300 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f4de365be8
commit
ed5c173366
@ -24,6 +24,20 @@
|
|||||||
if(defined('E_DEPRECATED')) error_reporting(E_ALL ^ E_DEPRECATED);
|
if(defined('E_DEPRECATED')) error_reporting(E_ALL ^ E_DEPRECATED);
|
||||||
else error_reporting(E_ALL);
|
else error_reporting(E_ALL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is for versions of PHP prior to version 5.2
|
||||||
|
* Creating this here will allow both web requests and cron jobs to inherit it.
|
||||||
|
*/
|
||||||
|
if (!function_exists('array_fill_keys')) {
|
||||||
|
function array_fill_keys($keys,$value) {
|
||||||
|
//Sometimes we get passed an empty array, and if that's the case, you'll get an error message
|
||||||
|
if(sizeof($keys)==0)
|
||||||
|
return Array();
|
||||||
|
else
|
||||||
|
return array_combine($keys,array_fill(0,count($keys),$value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Include _ss_environment.php files
|
* Include _ss_environment.php files
|
||||||
*/
|
*/
|
||||||
|
13
main.php
13
main.php
@ -65,19 +65,6 @@ if (function_exists('mb_http_output')) {
|
|||||||
mb_internal_encoding('UTF-8');
|
mb_internal_encoding('UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* This is for versions of PHP prior to version 5.2
|
|
||||||
*/
|
|
||||||
if (!function_exists('array_fill_keys')) {
|
|
||||||
function array_fill_keys($keys,$value) {
|
|
||||||
//Sometimes we get passed an empty array, and if that's the case, you'll get an error message
|
|
||||||
if(sizeof($keys)==0)
|
|
||||||
return Array();
|
|
||||||
else
|
|
||||||
return array_combine($keys,array_fill(0,count($keys),$value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Session::start();
|
Session::start();
|
||||||
|
|
||||||
// IIS will sometimes generate this.
|
// IIS will sometimes generate this.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user