سؤال

Is there a way to force Smarty 3 throw exceptions instead of notices? I want application to crash in there is undefined variable. In smarty 2 there was error_unassigned param, but looks like it's removed in v3.

هل كانت مفيدة؟

المحلول

$smarty->error_unassigned = true; still exists. A method to throw Exceptions on unassigned variables does not exist (yet), though. You could set_error_handler() to convert the notice to an exception.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top