Forum


Replies: 2   Views: 3063
'0' in array
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 zstov  · 21-03-2011 - 07:32

Hello,
I have a problem with the template.
In function replaceVariable in the file CreateTemplate.inc. if it gets '0' there is a problem.
The code: if (
strstr(
self::$_templateSymbol . $keys .
self::$_templateSymbol,
$entry->nodeValue
)
)
is fail when $entry->nodeValue is '0'.
I get the error: PHP Warning: strstr(): Empty delimiter

thanks

Posted by admin  · 11-04-2013 - 12:12

Hi,

You can do string casting before adding values or directly changing source code.

Regards.