Comments (8)
must have been 3.1.23 not 3.2.13 :-)
from smarty.
I can't reproduce your problem.
it does compile to
tpl_vars['p']->value['sid'];?>from smarty.
the example ist part of a longer template. Is there any reason where smarty can forget to escape the variable name? eg. [sid] instead of ['sid']
from smarty.
It looks like that sid is a defined constant.
A couple of versions ago the use of costanstants by their name was introduced.
However it did not work in all places.
It was fixed that a constant can now be used also as array index.
Maybe this is now the problem in your application.
from smarty.
I've that same problem in 3.1.24.
Something is wrong with this "sid"
When i try to use $smarty.get.params.sid, variable is null, but $smarty.get.params['sid'] is ok
from smarty.
Once again. I you have somewhere in your application sid defined as a constant. Support of constants was added to Smarty a couple of versions ago. In $smarty.get.params.sid will then not be interpreted as string array index, but the value of the constant will betaken. It' a naming conflict you must either rename the constant or use an other array index, So it's not a bug.
from smarty.
It turned out that SID is a constant created by session_start()
from smarty.
Hi Uwe,
it's quite awkward to prohibit an usecase that's supported by php. Is there any configuration option to disable this "feature"? Why was it introduced? There was already the possibility to use constants by $smarty.const.foo
Sincerely yours
Hasan
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.