diff --git a/main.php b/main.php index 860d374e7..e6d9b9d80 100644 --- a/main.php +++ b/main.php @@ -69,9 +69,13 @@ if (function_exists('mb_http_output')) { * 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)); - } + 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();