From c29cf7d30260446cfc38a43dd6a178f21465645d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 01:43:18 +0000 Subject: [PATCH] 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 --- main.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.php b/main.php index a493e4551..860d374e7 100644 --- a/main.php +++ b/main.php @@ -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.