Skip to content

Commit 8f283f8

Browse files
author
Tom Yrjas
committed
Anonymous recursive function requires use () to work,
Changed the variable that is passed into the function to be $value instead of $config to avoid infinite loop
1 parent ee48d9d commit 8f283f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GatewayInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ public static function getParameters($gateway)
442442
return null;
443443
}
444444

445-
$convertConstants = function(&$config) {
445+
$convertConstants = function(&$config) use (&$convertConstants){
446446
foreach ($config as $key => &$value) {
447447
if (is_array($value)) {
448-
$convertConstants($config);
448+
$convertConstants($value);
449449
continue;
450450
}
451451

0 commit comments

Comments
 (0)