summaryrefslogtreecommitdiffstats
path: root/32.patch
diff options
context:
space:
mode:
Diffstat (limited to '32.patch')
-rw-r--r--32.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/32.patch b/32.patch
new file mode 100644
index 0000000..53c5c03
--- /dev/null
+++ b/32.patch
@@ -0,0 +1,36 @@
+From 05fcad5da30ff15326ad13c91bcd49cdc3cb9ec7 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 3 Jan 2020 09:48:45 +0100
+Subject: [PATCH] Fix using array_key_exists() on objects is deprecated (7.4)
+
+---
+ src/Barcode.php | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/Barcode.php b/src/Barcode.php
+index 65e27ed7..27c2a487 100644
+--- a/src/Barcode.php
++++ b/src/Barcode.php
+@@ -51,13 +51,18 @@ public function __construct($options = null)
+ $options = [];
+ }
+
+- if (! is_array($options) && ! ($options instanceof Traversable)) {
++ if (is_array($options)) {
++ if (array_key_exists('options', $options)) {
++ $options['options'] = ['options' => $options['options']];
++ }
++ } else if ($options instanceof Traversable) {
++ if (property_exists($options, 'options')) {
++ $options['options'] = ['options' => $options['options']];
++ }
++ } else {
+ $options = ['adapter' => $options];
+ }
+
+- if (array_key_exists('options', $options)) {
+- $options['options'] = ['options' => $options['options']];
+- }
+
+ parent::__construct($options);
+ }