Giter VIP home page Giter VIP logo

Comments (4)

uwetews avatar uwetews commented on July 18, 2024

Smarty does use mbstring functions when Smarty::$_MBSTRING is true.
It's value was determined by function_exists('mb_split') which was a bad idea as mb_split could be call able also when mbstring functions are not present but could be made available as overloaded version by php.ini mbstring.func_overload setting.

The fix has been commited 47faa63

from smarty.

orlitzky avatar orlitzky commented on July 18, 2024

I accidentally commented on the commit 47faa63 yesterday rather than here; sorry. I have verified my suspicion using the following steps:

  1. Install smarty from git
  2. Install PHP with the mbstring extension
  3. Visit your site, on a page that uses escaping
  4. A cached template is stored in $smarty_dir/templates_c that makes use of mb_convert_encoding.
  5. Reinstall PHP, this time without mbstring
  6. Restart apache
  7. Visit the same page
  8. 500 error, missing mb_* functions.

from smarty.

uwetews avatar uwetews commented on July 18, 2024

Smarty does generate different compiled templates if PHP has mbstring extensions or not.
If you change your environvent like exchanging PHP you should delete the compiled and cached template files.

What you have done is not the normal use case.

I do not think that this is a shortcomming or bug of Smarty,

from smarty.

orlitzky avatar orlitzky commented on July 18, 2024

I wasn't suggesting that. I just wanted to point out for the search engines that the problem isn't what I initially reported.

Thanks again for your help!

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.