From df6a0d9c94240a8d10a9ab02161beab92e8577e4 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 31 Jan 2011 05:50:31 +0000 Subject: [PATCH] slightly better error handling than before?, RT#10574 --- FS/FS/svc_port.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FS/FS/svc_port.pm b/FS/FS/svc_port.pm index befe8ca46..db1f539b8 100644 --- a/FS/FS/svc_port.pm +++ b/FS/FS/svc_port.pm @@ -273,6 +273,12 @@ sub graph_png { 'order_by' => "order by $_date asc", }); + if ( ! scalar(@records) ) { + warn "$me no records returned for $serviceid\n"; + return ''; #should actually return a blank png (or, even better, the + # error message in the image) + } + warn "$me ". scalar(@records). " records returned for $serviceid\n" if $DEBUG; -- 2.11.0