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;