From 902ab6c5f86505eb18dfb23a9db2d3816b8a5ebf Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 27 May 2019 13:39:54 +0100 Subject: [PATCH] #584 fix for case where port has no corresponding properties row --- lib/App/Netdisco/Util/Port.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Util/Port.pm b/lib/App/Netdisco/Util/Port.pm index 780ff13b..84df6957 100644 --- a/lib/App/Netdisco/Util/Port.pm +++ b/lib/App/Netdisco/Util/Port.pm @@ -219,7 +219,8 @@ Returns true if the C<$port> L object has a phone connected. =cut sub port_has_phone { - return (shift)->properties->remote_is_phone; + my $properties = (shift)->properties; + return ($properties ? $properties->remote_is_phone : undef); } 1;