summaryrefslogtreecommitdiff
path: root/FS/FS/svc_port.pm
diff options
context:
space:
mode:
authorivan <ivan>2011-01-31 05:50:31 +0000
committerivan <ivan>2011-01-31 05:50:31 +0000
commitdf6a0d9c94240a8d10a9ab02161beab92e8577e4 (patch)
tree43db8cc69d14505964d6839c3b83384a78ad3d45 /FS/FS/svc_port.pm
parent9ce4a6639a0ac007151c213efab6265c806141f5 (diff)
slightly better error handling than before?, RT#10574
Diffstat (limited to 'FS/FS/svc_port.pm')
-rw-r--r--FS/FS/svc_port.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/svc_port.pm b/FS/FS/svc_port.pm
index befe8ca..db1f539 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;