summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/EFA.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index 53d2119..4a99742 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -127,6 +127,13 @@ sub new {
$self->{xml} = $response->decoded_content;
+ if ( not $self->{xml} ) {
+
+ # LibXML doesn't like empty documents
+ $self->{errstr} = 'Server returned nothing (empty result)';
+ return $self;
+ }
+
$self->{tree} = XML::LibXML->load_xml(
string => $self->{xml},
);