From: robert Date: Fri, 13 May 2005 17:17:16 +0000 (+0000) Subject: don't spit out an error from touch, we generate one ourselves anyways; don't output... X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=86ff8b911079d133c04f45ba8da182e2ef4ccda2;hp=31df2e13256aaf55e28d49646faa06b5762d9a96;ds=inline don't spit out an error from touch, we generate one ourselves anyways; don't output 1070-01-01 when last update is null --- 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'))) {