[Pkg-owncloud-commits] [php-sabre-vobject] 37/46: Support PHP 5.5

David Prévot taffit at moszumanska.debian.org
Thu Dec 10 02:12:41 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 3deda7396f8ae690d1a9ef9e259350ebb0dfb81e
Author: Evert Pot <me at evertpot.com>
Date:   Fri Nov 27 17:51:51 2015 -0500

    Support PHP 5.5
---
 lib/Parser/MimeDir.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/Parser/MimeDir.php b/lib/Parser/MimeDir.php
index 3a0f06c..9fc1761 100644
--- a/lib/Parser/MimeDir.php
+++ b/lib/Parser/MimeDir.php
@@ -53,8 +53,10 @@ class MimeDir extends Parser {
 
     /**
      * The list of character sets we support when decoding.
+     *
+     * This would be a const expression but for now we need to support PHP 5.5
      */
-    const SUPPORTED_CHARSETS = [
+    protected $SUPPORTED_CHARSETS = [
         'UTF-8',
         'ISO-8859-1',
         'Windows-1252',
@@ -103,7 +105,7 @@ class MimeDir extends Parser {
      */
     function setCharset($charset) {
 
-        if (!in_array($charset, self::SUPPORTED_CHARSETS)) {
+        if (!in_array($charset, self::$SUPPORTED_CHARSETS)) {
             throw new \InvalidArgumentException('Unsupported encoding. (Supported encodings: ' . implode(', ', self::SUPPORTED_CHARSETS) . ')');
         }
         $this->charset = $charset;

-- 
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