1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00
This commit is contained in:
Ryan Cramer
2021-05-10 08:41:21 -04:00
parent 26f31ce81b
commit 422aeff7ac

View File

@@ -3357,7 +3357,7 @@ class ProcessTemplate extends Process implements ConfigurableModule {
if($removeTag && $template->hasTag($removeTag)) {
$template->removeTag($removeTag);
}
if(in_array($template->name, $tagTemplates)) {
if(is_array($tagTemplates) && in_array($template->name, $tagTemplates)) {
// template should have the given tag
if($template->hasTag($saveTag)) continue;
$template->addTag($saveTag);