From 48c82fbee668eb600a2ec25f3a58f1f4c363d26a Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 9 Jun 2005 17:52:23 +0000 Subject: [PATCH] catch case where even color field of legend is empty: still detect it's a legend entry --- include/classes/rrdstat.php-class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.43.0