Forum


Replies: 1   Views: 3073
Issue -> addtemplatevariable
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by telekomsimple  · 10-12-2012 - 12:41

Hi there,

if $var is an array (like http://www.phpdocx.com/archives/1942) there is an problem with the log. Error Message:
The array could not be converted to string...

public function addTemplateVariable($var, $value = '', $settings = '')
{
$template = CreateTemplate::getInstance();
self::$log->info(
[u][b] 'Assign and replace text variable ' . $var . ' in template.'[/b][/u]
);
$template->replaceVariable($var, $value, $settings);
}