array_walk doesn't alter keys, fixed
This commit is contained in:
parent
095b7d7f14
commit
0a755cedae
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue