From 037704a801fd099e7c3715bd53a07ccde6d5b8f4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 16 Aug 2008 07:40:04 +0000 Subject: [PATCH] "php5.1 seems to have a bug: array_slice($parts,$offeset) != array_slice($parts,$offeset,null)" --- etemplate/inc/class.nextmatch_widget.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 663226286a..a3244c96a3 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -137,7 +137,8 @@ class nextmatch_widget static private function get_parts($name,$offset,$length=null) { $parts = explode('[',str_replace(']','',$name)); - return array_slice($parts,$offset,$length); + // php5.1 seems to have a bug: array_slice($parts,$offeset) != array_slice($parts,$offeset,null) + return is_null($length) ? array_slice($parts,$offset) : array_slice($parts,$offset,$length); } /**