"php5.1 seems to have a bug: array_slice($parts,$offeset) != array_slice($parts,$offeset,null)"

This commit is contained in:
Ralf Becker 2008-08-16 07:40:04 +00:00
parent 3090f728d6
commit 037704a801

View File

@ -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);
}
/**