From 657fe27e9ddf577ddef0eb6bb57c27573df9ace0 Mon Sep 17 00:00:00 2001 From: WDD-Marv Date: Thu, 4 May 2017 16:36:54 +0100 Subject: [PATCH] negating E_WARNING for strstr(): Empty needle in PayPalConfigManager.php E_WARNING strstr(): Empty needle (#831) * negating E_WARNING for "strstr(): Empty needle" --- lib/PayPal/Core/PayPalConfigManager.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/PayPal/Core/PayPalConfigManager.php b/lib/PayPal/Core/PayPalConfigManager.php index a7ee1ca..c341bb1 100644 --- a/lib/PayPal/Core/PayPalConfigManager.php +++ b/lib/PayPal/Core/PayPalConfigManager.php @@ -99,9 +99,11 @@ class PayPalConfigManager return $this->configs[$searchKey]; } else { $arr = array(); - foreach ($this->configs as $k => $v) { - if (strstr($k, $searchKey)) { - $arr[$k] = $v; + if ($searchKey !== '') { + foreach ($this->configs as $k => $v) { + if (strstr($k, $searchKey)) { + $arr[$k] = $v; + } } }