|
@@ -113,7 +113,7 @@ discard block |
|
|
block discarded – undo |
|
113
|
113
|
foreach ($data as $k => $val) { |
|
114
|
114
|
if (!is_array($val)) { |
|
115
|
115
|
// Find the self referenced placeholders and fill them. |
|
116
|
|
- $data[$k] = preg_replace_callback('/@\[([a-zA-Z0-9_.-]*?)]/', function ($matches) |
|
|
116
|
+ $data[$k] = preg_replace_callback('/@\[([a-zA-Z0-9_.-]*?)]/', function($matches) |
|
117
|
117
|
{ |
|
118
|
118
|
// Does this key exist, is so fill this match, if not, just return the match intact. |
|
119
|
119
|
return $this->get($matches[1]) ?: $matches[0]; |
|
@@ -125,7 +125,7 @@ discard block |
|
|
block discarded – undo |
|
125
|
125
|
} |
|
126
|
126
|
|
|
127
|
127
|
// Find the environment variable placeholders and fill them. |
|
128
|
|
- $data[$k] = preg_replace_callback('/\$\[([a-zA-Z0-9_.-]*?)]/', static function ($matches) |
|
|
128
|
+ $data[$k] = preg_replace_callback('/\$\[([a-zA-Z0-9_.-]*?)]/', static function($matches) |
|
129
|
129
|
{ |
|
130
|
130
|
// If locally set environment variable (variable not set by a SAPI) found, replace with it's value. |
|
131
|
131
|
if (!empty(getenv($matches[1], true))) { |
|
@@ -156,7 +156,7 @@ discard block |
|
|
block discarded – undo |
|
156
|
156
|
private function stringPlaceholderHandler(string $data): string |
|
157
|
157
|
{ |
|
158
|
158
|
// Find the self referenced placeholders and fill them. |
|
159
|
|
- return preg_replace_callback('/@\[([a-zA-Z0-9_.-]*?)]/', function ($matches) |
|
|
159
|
+ return preg_replace_callback('/@\[([a-zA-Z0-9_.-]*?)]/', function($matches) |
|
160
|
160
|
{ |
|
161
|
161
|
// Does this key exist, is so fill this match, if not, just return the match intact. |
|
162
|
162
|
$ret = $this->get($matches[1]) ?: $matches[0]; |