bugfix calling createTemplate(template, data) with empty data array caused notice of array to string conversion (Issue 189)