diff --git a/common/framework/Template.php b/common/framework/Template.php index 0049e68d9..8330aae8a 100644 --- a/common/framework/Template.php +++ b/common/framework/Template.php @@ -694,12 +694,12 @@ class Template } // If any of the variables seems to be an array or object, it's $vars. - if (!is_scalar($media_type)) + if (!is_scalar($media_type ?? '')) { $vars = $media_type; $media_type = null; } - if (!is_scalar($index)) + if (!is_scalar($index ?? '')) { $vars = $index; $index = null;