From: robert Date: Thu, 9 Jun 2005 17:52:23 +0000 (+0000) Subject: catch case where even color field of legend is empty: still detect it's a legend... X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=48c82fbee668eb600a2ec25f3a58f1f4c363d26a;p=php-utility-classes.git catch case where even color field of legend is empty: still detect it's a legend entry --- diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 4c5b459..d384f9f 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -744,7 +744,7 @@ class rrdstat { if (preg_match('/^file:(.+)$/', $gline, $regs)) { $gmeta['filename'] = $regs[1]; } - elseif (preg_match('/^legend:([^\|]+)\|([^|]+)\|([^\|]*)\|(.*)$/', $gline, $regs)) { + elseif (preg_match('/^legend:([^\|]+)\|([^|]*)\|([^\|]*)\|(.*)$/', $gline, $regs)) { $gmeta['legend'][$regs[1]] = array('color'=>$regs[2], 'color_bg'=>$regs[3], 'desc_long'=>$regs[4]); if (strlen($regs[4])) { $gmeta['legends_long'] = true; } if (strlen($regs[3]) || strlen($regs[4])) { $gmeta['default_colorize'] = true; }