BUGFIX: array_fill_keys function created for version prior to PHP 5.2 (from r96680)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102332 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-12 01:43:18 +00:00
parent 6491e3de26
commit c29cf7d302

View File

@ -65,6 +65,15 @@ if (function_exists('mb_http_output')) {
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) {
return array_combine($keys,array_fill(0,count($keys),$value));
}
}
Session::start();
// IIS will sometimes generate this.