bugfix calling createTemplate(template, data) with empty data array caus...

...ed notice of array to string conversion (Issue 189)