|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jonyo Smarty Rookie
Joined: 14 Feb 2011 Posts: 16
|
Posted: Mon Mar 12, 2012 7:48 pm Post subject: escape modifier doesn't work with versions before PHP 5.2.3 |
|
|
Took a while to figure out what was going on for one of our clients, we finally tracked it down to this PHP warning that was happening:
templates_c\1e269201f7338d87d6d69f0011b7a4d1dbf0e305.geo_tset.admin.admin.validating_login.tpl.php htmlspecialchars() expects at most 3 parameters, 4 given
Looking at both plugins/modifiercompiler.escape.php and plugins/modifier.escape.php from latest version, both result in call to htmlspecialchars() with 4 parameters. According to php.net, the 4th parameter double_encode was not added until PHP 5.2.3.
And it doesn't just "ignore" the 4th parameter, having 4 parameters actually results in a warning being thrown, and htmlspecialchars() returns an empty string which is obviously not good.
So, either need to build in some sort of PHP "version checking" and make it not use the 4th parameter (at the expense of being able to use double encoding prevention). OR somewhere on the site, need to mention this PHP 5.2.3 requirement.
Unless I'm just missing something, the only mention of PHP requirements is on the download page where it says "Smarty 3.x: PHP 5.2+" under requirements, giving the impression that it should work with PHP 5.2.0 and up when that is not the case. |
|
Back to top |
|
gcphost Smarty Rookie
Joined: 21 Jan 2006 Posts: 8
|
Posted: Sun Jun 24, 2012 3:57 pm Post subject: |
|
|
ditto! needs to be fixed |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Sun Jun 24, 2012 6:16 pm Post subject: |
|
|
It is fixed in SVN and will be included in the upcomming release 3.1.11 _________________ Twitter |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|