diff --git a/xmlstream.php b/xmlstream.php index 646d925..099116a 100644 --- a/xmlstream.php +++ b/xmlstream.php @@ -268,7 +268,7 @@ class XMLStream { } if(is_array($this->xmlobj)) { $this->xmlobj = array_slice($this->xmlobj, 0, 1); - if($this->xmlobj[0] instanceof XMLObj) { + if(isset($this->xmlobj[0]) && $this->xmlobj[0] instanceof XMLObj) { $this->xmlobj[0]->subs = null; } }