[Pkg-owncloud-commits] [php-sabre-vobject] 103/341: Fix conditions about the default value of $options.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 04295a4e492f5f3fe55ee6d2af6f0b9511503c77
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Mon Nov 24 18:42:41 2014 +0100
Fix conditions about the default value of $options.
---
lib/Parser/Json.php | 2 +-
lib/Parser/MimeDir.php | 4 +++-
lib/Parser/XML.php | 6 +++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/Parser/Json.php b/lib/Parser/Json.php
index 1510e2c..d208889 100644
--- a/lib/Parser/Json.php
+++ b/lib/Parser/Json.php
@@ -54,7 +54,7 @@ class Json extends Parser {
throw new EofException('End of input stream, or no input supplied');
}
- if (!is_null($options)) {
+ if (0 === $options) {
$this->options = $options;
}
diff --git a/lib/Parser/MimeDir.php b/lib/Parser/MimeDir.php
index e09a886..f1a2ed9 100644
--- a/lib/Parser/MimeDir.php
+++ b/lib/Parser/MimeDir.php
@@ -57,7 +57,9 @@ class MimeDir extends Parser {
}
- if (!is_null($options)) $this->options = $options;
+ if (0 === $options) {
+ $this->options = $options;
+ }
$this->parseDocument();
diff --git a/lib/Parser/XML.php b/lib/Parser/XML.php
index 8832eef..cd61815 100644
--- a/lib/Parser/XML.php
+++ b/lib/Parser/XML.php
@@ -72,13 +72,13 @@ class XML extends Parser {
*/
public function parse($input = null, $options = 0) {
- if(!is_null($input))
+ if (!is_null($input))
$this->setInput($input);
- if(!is_null($options))
+ if (0 === $options)
$this->options = $options;
- if(is_null($this->input))
+ if (is_null($this->input))
throw new EofException('End of input stream, or no input supplied');
if ($this->input['name'] === '{' . self::XCAL_NAMESPACE . '}icalendar') {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list