From 09ce724404f16e036cbdfeccb64a0955dafca99a Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 27 Jan 2011 00:30:20 +0000 Subject: [PATCH] diagnose winding up in svc_X_link without a cust_svc? RT#11331 --- FS/FS/UI/Web.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 2d00d2c14..cb740ee3b 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -3,6 +3,7 @@ package FS::UI::Web; use strict; use vars qw($DEBUG @ISA @EXPORT_OK $me); use Exporter; +use Carp qw( confess );; use FS::Conf; use FS::Misc::DateTime qw( parse_datetime ); use FS::Record qw(dbdef); @@ -143,6 +144,9 @@ sub svc_X_link { return $x unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); + confess "svc_X_link called without a service ($x, $m, $part_svc, $cust_svc)\n" + unless $cust_svc; + my $ahref = svc_url( 'ahref' => 1, 'm' => $m, -- 2.11.0