BUGFIX: array_fill_keys function created for version prior to PHP 5.2

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96680 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2010-01-12 03:06:43 +00:00 committed by Sam Minnee
parent d199f98804
commit 8d7658109e

View File

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