From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- .../files/JSON-1.0.3-constructor.patch | 42 ++++++++++++++++++++++ .../files/JSON-1.0.3-upstream-typo.patch | 20 +++++++++++ 2 files changed, 62 insertions(+) create mode 100644 dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch create mode 100644 dev-php/PEAR-Services_JSON/files/JSON-1.0.3-upstream-typo.patch (limited to 'dev-php/PEAR-Services_JSON/files') diff --git a/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch new file mode 100644 index 000000000000..d7348f0f858e --- /dev/null +++ b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch @@ -0,0 +1,42 @@ +diff -aurN a/JSON.php b/JSON.php +--- a/JSON.php 2011-01-13 21:40:48.000000000 -0500 ++++ b/JSON.php 2018-02-15 11:42:06.551287857 -0500 +@@ -139,6 +139,14 @@ + * strings or numbers, if you return an object, make sure it does + * not have a toJSON method, otherwise an error will occur. + */ ++ function __construct($use = 0) ++ { ++ $this->use = $use; ++ $this->_mb_strlen = function_exists('mb_strlen'); ++ $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); ++ $this->_mb_substr = function_exists('mb_substr'); ++ } ++ + function Services_JSON($use = 0) + { + $this->use = $use; +@@ -909,6 +917,11 @@ + + class Services_JSON_Error extends PEAR_Error + { ++ function __construct($message = 'unknown error', $code = null, ++ $mode = null, $options = null, $userinfo = null) ++ { ++ parent::__construct($message, $code, $mode, $options, $userinfo); ++ } + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { +@@ -923,6 +936,11 @@ + */ + class Services_JSON_Error + { ++ function __construct($message = 'unknown error', $code = null, ++ $mode = null, $options = null, $userinfo = null) ++ { ++ return; ++ } + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { diff --git a/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-upstream-typo.patch b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-upstream-typo.patch new file mode 100644 index 000000000000..c7d8be3aa910 --- /dev/null +++ b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-upstream-typo.patch @@ -0,0 +1,20 @@ +--- a/JSON.php 2011/01/28 00:16:42 307804 ++++ b/JSON.php 2013/04/30 02:37:26 330165 +@@ -554,7 +544,7 @@ + + return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS) + ? 'null' +- : new Services_JSON_Error(class_name($var). ++ : new Services_JSON_Error(get_class($var). + " toJSON returned an object with a toJSON method."); + + } +@@ -995,7 +985,7 @@ + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { +- ++ return; + } + } + -- cgit v1.2.3