summaryrefslogtreecommitdiffstats
path: root/27.patch
blob: 12ebe25c3d17c9ea0c0ec7ff2da93bc78bad187a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From a24e257e3f4975723e3176942ca9bcafb4222429 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 13 Dec 2017 15:37:15 +0100
Subject: [PATCH] Fix #26 regression with previous cache configuration

---
 src/Bartlett/Reflect/Plugin/PluginManager.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Bartlett/Reflect/Plugin/PluginManager.php b/src/Bartlett/Reflect/Plugin/PluginManager.php
index 483b200..fdf19c5 100644
--- a/src/Bartlett/Reflect/Plugin/PluginManager.php
+++ b/src/Bartlett/Reflect/Plugin/PluginManager.php
@@ -68,10 +68,12 @@ public function registerPlugins()
             if (class_exists($plugin['class'])) {
                 if (isset($plugin['options'])) {
                     $options = $plugin['options'];
-                    if (is_string($options) && class_exists($options)) {
-                        $options = new $options;
-                    } else {
-                        $options = null;
+                    if (is_string($options)) {
+                        if (class_exists($options)) {
+                            $options = new $options;
+                        } else {
+                            $options = null;
+                        }
                     }
                 } else {
                     $options = null;