From 2c66992d1d66abcd81a83336ec69c9f4060c2613 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 1 Oct 2007 10:36:17 +0000 Subject: [PATCH] "fixed php4 problem reported on the user-list: undefined function: array_combine()," --- etemplate/inc/class.nextmatch_widget.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index ba2671083e..dc97f538b9 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -956,3 +956,17 @@ return $fields; } } + +if (!function_exists('array_combine')) // php5+ +{ + function array_combine($keys,$values) + { + $combined = array(); + $values = array_values($values); + foreach(array_values($keys) as $n => $key) + { + $combined[$key] = $values[$n]; + } + return $combined; + } +}