From 893c5330eed4d2d8691cbdf89886a374efff2f05 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 14 Jun 2017 11:00:23 -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 d11fdad48..f6c3ff78d 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1520,8 +1520,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.20.1