From 12b91e6f2cbf37644b77e42d7353fab325b6a71d Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 14 Jun 2017 11:00:20 -0700 Subject: [PATCH] fix error on changing customer when there isn't an implicit contact, RT#76405 --- FS/FS/cust_main.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 23d54b607..f8157c478 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1523,8 +1523,10 @@ sub replace { custnum => $self->custnum, } ); - $implicit_contact->set($_, $i_cust_contact->$_) - foreach qw( classnum selfservice_access comment ); + if ( $i_cust_contact ) { + $implicit_contact->set($_, $i_cust_contact->$_) + foreach qw( classnum selfservice_access comment ); + } my $error; if ( $implicit_contact->contactnum ) { -- 2.11.0