X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Frrdstat.php-class;h=9e2a747b9da4e41b5b6847f135f3025dc8437ee5;hp=470a131ceac6ca214d4f531948589b07196abfdb;hb=86ff8b911079d133c04f45ba8da182e2ef4ccda2;hpb=31df2e13256aaf55e28d49646faa06b5762d9a96;ds=sidebyside 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'))) {