[Pkg-owncloud-commits] [php-sabre-vobject] 19/25: A better error message for unsupported VALUE parameters.

David Prévot taffit at moszumanska.debian.org
Thu Apr 7 01:41:30 UTC 2016


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 c20acd7de21196aa829100aa3d4b44e213497c4f
Author: Evert Pot <me at evertpot.com>
Date:   Wed Apr 6 16:33:19 2016 -0400

    A better error message for unsupported VALUE parameters.
    
    Related to https://github.com/fruux/Baikal/issues/524
---
 lib/Document.php | 6 ++++--
 lib/Version.php  | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/Document.php b/lib/Document.php
index 7541750..03252ab 100644
--- a/lib/Document.php
+++ b/lib/Document.php
@@ -216,6 +216,9 @@ abstract class Document extends Component {
             // If a VALUE parameter is supplied, we should use that.
             if (isset($parameters['VALUE'])) {
                 $class = $this->getClassNameForPropertyValue($parameters['VALUE']);
+                if (is_null($class)) {
+                    throw new InvalidDataException('Unsupported VALUE parameter for ' . $name . ' property. You supplied "' . $parameters['VALUE'] . '"');
+                }
             }
             else {
                 $class = $this->getClassNameForPropertyName($name);
@@ -236,8 +239,7 @@ abstract class Document extends Component {
      * This method returns null if we don't have a specialized class.
      *
      * @param string $valueParam
-     *
-     * @return void
+     * @return string|null
      */
     function getClassNameForPropertyValue($valueParam) {
 
diff --git a/lib/Version.php b/lib/Version.php
index 806c43a..0b0e16c 100644
--- a/lib/Version.php
+++ b/lib/Version.php
@@ -14,6 +14,6 @@ class Version {
     /**
      * Full version number.
      */
-    const VERSION = '4.1.4';
+    const VERSION = '4.1.0';
 
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list