From a5f6e6388a58ac92e7864190678ce9280c60148f Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 15 Dec 2016 20:32:49 -0500 Subject: [PATCH 1/2] Fix exception on PHP 7.1 --- src/Matchers/L33tMatch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Matchers/L33tMatch.php b/src/Matchers/L33tMatch.php index 99abb49..b129cc0 100644 --- a/src/Matchers/L33tMatch.php +++ b/src/Matchers/L33tMatch.php @@ -49,7 +49,7 @@ public static function match($password, array $userInputs = array()) foreach ($results as $result) { // Set substituted elements. $result['sub'] = array(); - $result['sub_display'] = ''; + $result['sub_display'] = []; foreach ($indexSubs as $i => $t) { $result['sub'][$password[$i]] = $t; $result['sub_display'][] = "$password[$i] -> $t"; @@ -190,4 +190,4 @@ protected static function getSubstitutions($password) return $map; } -} \ No newline at end of file +} From 3ecd8aec86a65d143088cd6d9cd8905d01b7256a Mon Sep 17 00:00:00 2001 From: Scott Date: Fri, 6 Jan 2017 10:38:08 -0500 Subject: [PATCH 2/2] Update L33tMatch.php --- src/Matchers/L33tMatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Matchers/L33tMatch.php b/src/Matchers/L33tMatch.php index b129cc0..9402680 100644 --- a/src/Matchers/L33tMatch.php +++ b/src/Matchers/L33tMatch.php @@ -49,7 +49,7 @@ public static function match($password, array $userInputs = array()) foreach ($results as $result) { // Set substituted elements. $result['sub'] = array(); - $result['sub_display'] = []; + $result['sub_display'] = array(); foreach ($indexSubs as $i => $t) { $result['sub'][$password[$i]] = $t; $result['sub_display'][] = "$password[$i] -> $t";