From 096749ef4db0acfa92df324261ccc7b69b7c2d68 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 21 Mar 2017 12:29:23 +0100 Subject: [PATCH] TT#13262 Fix wrong condition in field_to_destination OR-part must go into parantheses, otherwise $c->user is called on an undefined $c if $c is not passed in. Change-Id: Iebc07eb19ae306c61fbcfd39f35325b3c69d2bc4 --- lib/NGCP/Panel/Utils/Subscriber.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Utils/Subscriber.pm b/lib/NGCP/Panel/Utils/Subscriber.pm index 3628e96804..dda7c4d64a 100644 --- a/lib/NGCP/Panel/Utils/Subscriber.pm +++ b/lib/NGCP/Panel/Utils/Subscriber.pm @@ -1193,7 +1193,7 @@ sub field_to_destination { my ($vuser, $vdomain) = split(/\@/, $v); $vdomain = $domain unless($vdomain); - if($c && $c->user->roles eq "subscriberadmin" || $c->user->roles eq "subscriber") { + if($c && ($c->user->roles eq "subscriberadmin" || $c->user->roles eq "subscriber")) { $vuser = NGCP::Panel::Utils::Subscriber::apply_rewrite( c => $c, subscriber => $sub, number => $vuser, direction => 'callee_in', );