Skip to content

Commit 1199aca

Browse files
authored
Merge pull request silverstripe#234 from tom890180/master
Anonymous recursive function requires use () to work & changed var passed into it to avoid infinite loop
2 parents ee48d9d + 8f283f8 commit 1199aca

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)