From 2c777acb25fd5355ec02dc74c428174df80310d0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 22 Aug 2020 19:31:29 +0200 Subject: composer update sabre libs --- vendor/sabre/xml/lib/Service.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'vendor/sabre/xml/lib/Service.php') 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); -- cgit v1.2.3