From: ivan Date: Thu, 27 Jan 2011 00:30:20 +0000 (+0000) Subject: diagnose winding up in svc_X_link without a cust_svc? RT#11331 X-Git-Tag: freeside_2_3_0~687 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=09ce724404f16e036cbdfeccb64a0955dafca99a;hp=9d5b7fa247a69a0d912eec2486014e689f0694cd;p=freeside.git diagnose winding up in svc_X_link without a cust_svc? RT#11331 --- 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,