-
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
Smarty fails with any plugin that ends in 'close' #52
Comments
looks like https://github.com/smarty-php/smarty/blob/master/libs/sysplugins/smarty_internal_templatecompilerbase.php#L521 is the problem echo substr($tag, - 5); above this line says 'close' i think @uwetews need to check this |
Smarty does use tag names ending with close internally to handle closing tags. Like {/foo} => fooclose. It allows for example to write compiler plugins for block tags usage. One compiler plugin 'foo' and one for 'fooclose' to use {foo} .... {/foo}. |
Well, the problem is that older versions of smarty (2.x) didn't do that... And now those plugins cause an error in smarty 3. Is it possible to change smarty in the next version to use a delimiter On Thu, Jun 11, 2015 at 1:06 PM, uwetews [email protected] wrote:
|
If I do that Smarty 3 users which have written compiler plugins for closing tags will get errors. |
This problem is now resolved. |
…-reservation-information-for-reservations-registered-from-the-new-WEB-reservation-is-not-displayed-(reservation-screen-/-pop-up) Redmine: #5314 Displaying the new reservation system notes data
Sample code:
registerPlugin('function','testclose','test_plugin',false); $tpl = '{testclose}'; $smarty->display('string:'.$tpl); ?>Error:
PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "4f51b386251639c28dd52ffe53b55c127b1faa69" on line 1 "{testclose}" unknown tag "testclose" <--
thrown in /nfs/u1404/smarty_test/smarty-3.1.24/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 1
Note:
Changing the plugin name to 'testfoo' and the call in the template to {testfoo} provides the expected output.
The text was updated successfully, but these errors were encountered: