diff options
author | Mario Vavti <mario@mariovavti.com> | 2020-08-22 19:31:29 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2020-08-22 19:31:29 +0200 |
commit | 2c777acb25fd5355ec02dc74c428174df80310d0 (patch) | |
tree | 8b74931f1b6c72d885cb47a451b71a565c4187d9 /vendor/sabre/xml/lib/Service.php | |
parent | 49df57df45f82e2e0f1b10f2508f61b78d6d3ac0 (diff) | |
download | volse-hubzilla-2c777acb25fd5355ec02dc74c428174df80310d0.tar.gz volse-hubzilla-2c777acb25fd5355ec02dc74c428174df80310d0.tar.bz2 volse-hubzilla-2c777acb25fd5355ec02dc74c428174df80310d0.zip |
composer update sabre libs
Diffstat (limited to 'vendor/sabre/xml/lib/Service.php')
-rw-r--r-- | vendor/sabre/xml/lib/Service.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php index 9a2c47794..596c93cc4 100644 --- a/vendor/sabre/xml/lib/Service.php +++ b/vendor/sabre/xml/lib/Service.php @@ -115,12 +115,13 @@ class Service // Unfortunately the XMLReader doesn't support streams. When it // does, we can optimize this. $input = (string) stream_get_contents($input); + } - // If input is an empty string, then its safe to throw exception - if ('' === $input) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } + // If input is empty, then its safe to throw exception + if (empty($input)) { + throw new ParseException('The input element to parse is empty. Do not attempt to parse'); } + $r = $this->getReader(); $r->contextUri = $contextUri; $r->XML($input, null, $this->options); @@ -158,12 +159,13 @@ class Service // Unfortunately the XMLReader doesn't support streams. When it // does, we can optimize this. $input = (string) stream_get_contents($input); + } - // If input is empty string, then its safe to throw exception - if ('' === $input) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } + // If input is empty, then its safe to throw exception + if (empty($input)) { + throw new ParseException('The input element to parse is empty. Do not attempt to parse'); } + $r = $this->getReader(); $r->contextUri = $contextUri; $r->XML($input, null, $this->options); |