From 0a755cedaee148fdd81686b5e125d0db1843017c Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Wed, 22 May 2013 15:17:54 -0400 Subject: [PATCH] array_walk doesn't alter keys, fixed --- PHPCI/Builder.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index 2043531f..a7b60bc1 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -263,10 +263,11 @@ class Builder */ public function interpolate($input) { - $translations = array_walk($this->getInterpolationVars(), function($value, &$key) { - $key = '%'.$key.'%'; - }); - return strtr($input, $translations); + $trans_table = array(); + foreach ($this->getInterpolationVars() as $key => $value) { + $trans_table['%'.$key.'%'] = $value; + } + return strtr($input, $trans_table); } /**