mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-30 07:57:14 +02:00
fix
This commit is contained in:
@ -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 ' .
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user