diff --git a/libs/sysplugins/smarty_internal_resource_file.php b/libs/sysplugins/smarty_internal_resource_file.php index 92b1a97e..3d241e70 100644 --- a/libs/sysplugins/smarty_internal_resource_file.php +++ b/libs/sysplugins/smarty_internal_resource_file.php @@ -172,10 +172,8 @@ class Smarty_Internal_Resource_File extends Smarty_Resource if ($source->exists) { return file_get_contents($source->filepath); } - if ($source instanceof Smarty_Template_Config) { - throw new SmartyException("Unable to read config {$source->type} '{$source->name}'"); - } - throw new SmartyException("Unable to read template {$source->type} '{$source->name}'"); + throw new SmartyException('Unable to read ' . ($source->isConfig ? 'config' : 'template') . + " {$source->type} '{$source->name}'"); } /**