This commit is contained in:
Simon Wisselink
2024-04-05 17:35:28 +02:00
parent 6a1f56d51f
commit cabc862ee5
2 changed files with 1 additions and 8 deletions

View File

@ -643,7 +643,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
if ( if (
!$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name) !$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name)
&& !$this->getPlugin($name, Smarty::PLUGIN_MODIFIER) && !isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$name])
&& !in_array($name, ['time', 'join', 'is_array', 'in_array']) && !in_array($name, ['time', 'join', 'is_array', 'in_array'])
) { ) {
trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' . trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' .

View File

@ -25,11 +25,6 @@ class ArgumentMustBePassedByReference961Test extends PHPUnit_Smarty
public function testResetAsModifier() public function testResetAsModifier()
{ {
$smarty = new Smarty(); $smarty = new Smarty();
// $previousErrorReporting = $smarty->error_reporting;
// $smarty->setErrorReporting($previousErrorReporting | E_USER_DEPRECATED);
// $smarty->registerPlugin('modifier', 'reset', 'reset');
// $this->expectDeprecation();
try { try {
$templateStr = "string:{\$ar|reset}"; $templateStr = "string:{\$ar|reset}";
$smarty->assign('ar', [1,2,3]); $smarty->assign('ar', [1,2,3]);
@ -39,8 +34,6 @@ class ArgumentMustBePassedByReference961Test extends PHPUnit_Smarty
); );
} catch (Exception $e) { } catch (Exception $e) {
} }
// $smarty->setErrorReporting($previousErrorReporting);
} }
/** /**