summaryrefslogtreecommitdiff
path: root/dev-php/PEAR-Services_JSON/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-php/PEAR-Services_JSON/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-php/PEAR-Services_JSON/files')
-rw-r--r--dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch42
-rw-r--r--dev-php/PEAR-Services_JSON/files/JSON-1.0.3-upstream-typo.patch20
2 files changed, 62 insertions, 0 deletions
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;
+ }
+ }
+