Comments (5)
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'
if you look at line https://github.com/smarty-php/smarty/blob/master/libs/sysplugins/smarty_internal_templatecompilerbase.php#L638 you see that the 'close' will be removed and then it will trigger the error becouse your plugin has the name 'testclose' and not 'test'
i think @uwetews need to check this
from smarty.
Smarty does use tag names ending with close internally to handle closing tags. Like {/foo} => fooclose.
You should not use it as a standalone plugin name.
It allows for example to write compiler plugins for block tags usage. One compiler plugin 'foo' and one for 'fooclose' to use {foo} .... {/foo}.
from smarty.
Well, the problem is that older versions of smarty (2.x) didn't do that...
and there are valid cases where people have written smarty plugins for
various third party packages using smarty with the name 'close' in them,
and those plugins are years old...... maybe they could have used a block
tag, but they didn't. i.e: tags like {form_open} or {form_close} or
{togglearea_open} and {togglearea_close}
And now those plugins cause an error in smarty 3.
Is it possible to change smarty in the next version to use a delimiter
like: "_smartyclose" or something that is less likely to conflict with
valid tag names.
On Thu, Jun 11, 2015 at 1:06 PM, uwetews [email protected] wrote:
Smarty does use tag names ending with close internally to handle closing
tags. Like {/foo} => fooclose.
You should not use it as a standalone plugin name.It allows for example to write compiler plugins for block tags usage. One
compiler plugin 'foo' and one for 'fooclose' to use {foo} .... {/foo}.—
Reply to this email directly or view it on GitHub
#52 (comment).
from smarty.
If I do that Smarty 3 users which have written compiler plugins for closing tags will get errors.
What I can do is to handle tags ending with "_close" like normal plugins tag.
from smarty.
This problem is now resolved.
Function plugins can now have names ending with 'close'.
The fix is in dev-master and will later be included in the 3.1.28 release.
from smarty.
Related Issues (20)
- Suggestion: {namspace} compile tag
- PHP Deprecated: Using Smarty::loadFilter() to load filters is deprecated and will be removed in a future release.
- Smarty v5 $smarty.template behavior doesn't match v5 documentation (it now includes a type and directory part)
- Smarty v5 built-in json_encode modifier doesn't take Smarty $_CHARSET encoding into account, and can't be overridden using registerPlugin() HOT 18
- value and name of backed enums
- use a trailing comma in arrays HOT 1
- Smarty_Internal_Template::render(): Cannot use output buffering in output buffering display handlers HOT 7
- Support nullsafe operator HOT 2
- Fatal error: Uncaught --> Smarty: Unable to write file [file_path] thrown in C:\[project_path]\vendor\smarty\smarty\src\Smarty.php on line 1732 HOT 6
- Request for `prependTemplateDir()` or more options with `addTemplateDir()` - weight, duplicate handling HOT 9
- undefined extension class 'Smarty_Internal_Method_Get_Template_Vars' HOT 1
- Is it possible patch v2 for PHP8 instead of migrating to v4+? HOT 1
- default modifier ignores nocache on variables
- Smarty registered classes check prevents use of class constants to avoid typo bugs in templates HOT 2
- 4.5.3: Function whitelist via Smarty_Security is being ignored
- Misleading error messages with {capture}
- Smarty v5 Error: {section} Tag First Argument Type Mismatch when opening and closing tag on NoCache HOT 3
- Help with Smarty dateformat modifier - change to dd/mm/yyyy HOT 5
- Error: For loop not working when using extends resource type
- Smarty Not Working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smarty.