-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
registerFilter does not allow to use Anonymous functions(closures) #59
Comments
Closure support is new added in the dev-master version. Read also NEW_FEATURES.txt |
Thank you. |
May be an issue with two or more closure's filters. 1)first call to registerFilter returns 2)second call to registerFilter overwrites the first filter The problem code is not uniq index in the _getFilterName function
|
Should I open a new ticket related to non-unique filter names ? |
I updated NEW_FEATURES.txt to make it more clear. If you register multiple closures use the new filter name parameter to assign unique filter names. $smarty->registerFilter('pre', function($content) {return $content;}, 'name1'); |
Merge release-2.0.7 into master branch
The sample code is
the possible fix is
The function _get_filter_name returns wrong name for a closure
It results to
Warning: Illegal offset type to /lib/smarty3/sysplugins/smarty_internal_templatebase.php on line 699
PHP 5.3.29
The text was updated successfully, but these errors were encountered: