summaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/VObject/Parameter.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/VObject/Parameter.php')
-rw-r--r--[-rwxr-xr-x]3rdparty/Sabre/VObject/Parameter.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/3rdparty/Sabre/VObject/Parameter.php b/3rdparty/Sabre/VObject/Parameter.php
index 2e39af5f78a..d6d7c54c3bd 100755..100644
--- a/3rdparty/Sabre/VObject/Parameter.php
+++ b/3rdparty/Sabre/VObject/Parameter.php
@@ -1,5 +1,7 @@
<?php
+namespace Sabre\VObject;
+
/**
* VObject Parameter
*
@@ -8,13 +10,11 @@
* DTSTART;VALUE=DATE:20101108
* VALUE=DATE would be the parameter name and value.
*
- * @package Sabre
- * @subpackage VObject
* @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-class Sabre_VObject_Parameter extends Sabre_VObject_Node {
+class Parameter extends Node {
/**
* Parameter name
@@ -38,6 +38,10 @@ class Sabre_VObject_Parameter extends Sabre_VObject_Node {
*/
public function __construct($name, $value = null) {
+ if (!is_scalar($value) && !is_null($value)) {
+ throw new \InvalidArgumentException('The value argument must be a scalar value or null');
+ }
+
$this->name = strtoupper($name);
$this->value = $value;