Fixed PHP-981: Empty document should not throw exception
Merge pull request #584 from bjori/PHP-981-empty-document

Fixed PHP-981: Empty document should not throw exception

* bjori/PHP-981-empty-document:
  Fixed PHP-981: Empty document should not throw exception