check for set variables
This commit is contained in:
parent
50caa843f3
commit
d73c036e5a
@ -125,11 +125,14 @@ class d3DocumentRenderer implements BlockRendererInterface
|
|||||||
$daux = new Daux(Daux::STATIC_MODE, $output);
|
$daux = new Daux(Daux::STATIC_MODE, $output);
|
||||||
$daux->initializeConfiguration();
|
$daux->initializeConfiguration();
|
||||||
|
|
||||||
$variables = $daux->getParams()['variables'];
|
$params = $daux->getParams();
|
||||||
if (isset($variables) && is_array($variables) && count($variables)) {
|
if (isset($params['variables'])) {
|
||||||
foreach ($variables as $varname => $varvalue) {
|
$variables = $params['variables'];
|
||||||
$pattern = '/{\$'.$varname.'}/mU';
|
if (isset($variables) && is_array($variables) && count($variables)) {
|
||||||
$wholeDoc = preg_replace($pattern, $varvalue, $wholeDoc);
|
foreach ($variables as $varname => $varvalue) {
|
||||||
|
$pattern = '/{\$'.$varname.'}/mU';
|
||||||
|
$wholeDoc = preg_replace($pattern, $varvalue, $wholeDoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user