Git Product home page Git Product logo

Comments (8)

stekida avatar stekida commented on July 1, 2024

must have been 3.1.23 not 3.2.13 :-)

from smarty.

uwetews avatar uwetews commented on July 1, 2024

I can't reproduce your problem.

it does compile to

tpl_vars['p']->value['sid'];?>

from smarty.

stekida avatar stekida commented on July 1, 2024

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.

uwetews avatar uwetews commented on July 1, 2024

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.

michal-grabowski avatar michal-grabowski commented on July 1, 2024

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.

uwetews avatar uwetews commented on July 1, 2024

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.

uwetews avatar uwetews commented on July 1, 2024

It turned out that SID is a constant created by session_start()

from smarty.

HHGAG avatar HHGAG commented on July 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.