From 86ff8b911079d133c04f45ba8da182e2ef4ccda2 Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 13 May 2005 17:17:16 +0000 Subject: [PATCH 1/1] don't spit out an error from touch, we generate one ourselves anyways; don't output 1070-01-01 when last update is null --- include/classes/rrdstat.php-class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 470a131..9e2a747 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -23,7 +23,7 @@ class rrdstat { if (!is_null($this->rrd_file)) { if (!is_writeable($this->rrd_file)) { if (!file_exists($this->rrd_file)) { - if (touch($this->rrd_file)) { $this->create(); } + if (@touch($this->rrd_file)) { $this->create(); } else { trigger_error('RRD file can not be created', E_USER_WARNING); } } else { @@ -500,7 +500,7 @@ class rrdstat { $out .= '

'.$ptitle.'

'; if (!isset($pconf['show_update']) || $pconf['show_update']) { - $out .= '

Last Update: '.date('Y-m-d H:i:s', $this->last_update()).'

'; + $out .= '

Last Update: '.(is_null($this->last_update())?'unknown':date('Y-m-d H:i:s', $this->last_update())).'

'; } if (in_array($this->status, array('ok','readonly'))) { -- 2.35.3