diff options
author | Remi Collet <remi@remirepo.net> | 2020-01-09 13:21:57 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-01-09 13:21:57 +0100 |
commit | 3c204e2c14651f52f1f12660920c2a6601537976 (patch) | |
tree | 9f5c65b304a92d89bdccb6a4a1ade5c52f8ee545 /32.patch | |
parent | b139a22095b8c71b5b9fd69789baf7254ea97bd1 (diff) |
switch to Laminas
Diffstat (limited to '32.patch')
-rw-r--r-- | 32.patch | 36 |
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); + } |