Smarty Changelog

What's new in Smarty 3.1.21

Oct 24, 2014
  • composer moved to github
  • add COMPOSER_RELEASE_NOTES
  • bugfix on $php_handling security and optimization of smarty_internal_parsetree (Thue Kristensen)
  • bugfix composer.json update
  • bugfix calling a new created cache file with fetch() and Smarty::CACHING_LIFETIME_SAVED multiple times did fail (forum 22350)
  • bugfix any tag placed within "" will throw a security exception to close all thinkable holes
  • bugfix classmap in root composer.json should start at "libs/..."
  • improvement cache is_file(file_exists) results of loadPlugin() to avoid unnecessary calls during compilation (Issue 201}
  • bugfix a comment like "" bypassed $php_handling checking (Thue Kristensen)
  • bugfix change of 08.10.2014 could create E_NOTICE meassage when using "

New in Smarty 3.1.20 (Oct 24, 2014)

  • bugfix security mode of "" must be controlled by $php_handling property (Thue Kristensen)
  • bugfix template resource of inheritance blocks could get invalid if the default resource type is not 'file'(Issue 202)
  • bugfix existing child {block} tag must override parent {block} tag append / prepend setting (topic 25259)
  • bugfix modifier wordwrap did output break string wrong if first word was exceeding length with cut = true (topic 25193)
  • bugfix cache clear when cache folder does not exist
  • enhancement remove BOM automatically from template source (topic 25161)
  • bugfix the bufix of 02.06.2014 broke correct handling of child templates with same name but different template folders in extends resource (issue 194 and topic 25099)

New in Smarty 3.1.19 (Jul 3, 2014)

  • Bugfix template variables could not be passed as paramter in {include} when the include was in a {nocache} section (topic 25131)
  • Bugfix large template text of some charsets could cause parsing errors (topic 24630)
  • Bugfix registered objects did not work after spelling fixes of 06.06.2014
  • Bugfix {block} tags within {literal} .. {/literal} got not displayed correctly (topic 25024)
  • Bugfix UNC WINDOWS PATH like "\\psf\path\to\dir" did not work as template directory (Issue 192)
  • Bugfix {html_image} security check did fail on files relative to basedir (Issue 191)
  • Fixed PHPUnit outputFilterTrimWhitespaceTests.php assertion of test result
  • Fixed spelling, PHPDoc , minor errors, code cleanup
  • Using multiple cwd with relative template dirs could result in identical compiled file names. (issue 194 and topic 25099)
  • Bugfix calling createTemplate(template, data) with empty data array caused notice of array to string conversion (Issue 189)
  • Bugfix clearCompiledTemplate() did not delete files on WINDOWS when a compile_id was specified
  • Revert bugfix of 5.4.2014 because %-e date format is not supported on all operating systems

New in Smarty 3.1.18 (Jun 7, 2014)

  • bugfix template inheritance fail when using custom resource after patch of 8.3.2014 (Issue 187)
  • bugfix update of composer file (Issue 168 and 184)
  • bugfix default date format leads to extra spaces when displaying dates with single digit days (Issue 165)
  • bugfix Smart_Resource_Custom should not lowercase the resource name (Issue 183)
  • bugfix using a {foreach} property like @iteration could fail when used in inheritance parent templates (Issue 182)
  • bugfix $smarty->auto_literal and mbsting.func_overload 2, 6 or 7 did fail (forum topic 24899)
  • revert change of 17.03.2014
  • bugfix $smarty->auto_literal and mbsting.func_overload 2, 6 or 7 did fail (forum topic 24899)
  • bugfix Smarty_CacheResource_Keyvaluestore did use different keys on read/writes and clearCache() calls (Issue 169)
  • bugfix clearXxx() change of 27.1.2014 did not work when specifing cache_id or compile_id (forum topic 24868 and 24867)

New in Smarty 3.1.14 (Oct 2, 2013)

  • bugfix removed PHP 5.5 deprecated preg_replace /e option in modifier capitalize (forum topic 24389)
  • fixed spelling in sources and documentation (from smarty-developers forum Veres Lajos)
  • enhancement added constant SMARTY::CLEAR_EXPIRED for the change of 26.05.2013 (forum topic 24310)
  • bugfix added smarty_security.php to composer.json (Issue 135)
  • enhancement an expire_time of -1 in clearCache() and clearAllCache() will delete outdated cache files by their individual cache_lifetime used at creation (forum topic 24310)
  • bugfix modifier strip_tags:true was compiled into wrong code (Forum Topic 24287)
  • bugfix /n after ?> in Smarty.class.php did start output buffering (Issue 138)
  • bugfix escape and wordrap modifier could be compiled into wrong code when used in {nocache}{/nocache} section but caching is disabled (Forum Topic 24260)
  • bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094)
  • bugfix after the fix for Issue #130 compiler exceptions got double escaped (Forum Topic 24199)
  • bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)
  • bugfix Compile ID gets nulled when compiling child blocks (Issue #134)
  • bugfix wrong tag type in smarty_internal_templatecompilerbase.php could cause wrong plugin search order (Forum Topic 24028)

New in Smarty 3.1.7 (Jan 2, 2012)

  • bugfix enable more entropy in Smarty_Internal_Write_File for "more uniqueness" and Cygwin compatibility (Forum Topic 20724)
  • bugfix embedded quotes in single quoted strings did not compile correctly in {nocache} sections (Forum Topic 20730)

New in Smarty 3.1.6 (Dec 4, 2011)

  • bugfix is_cache() for individual cached subtemplates with $smarty->caching = CACHING_OFF did produce an exception (Forum Topic 20531)

New in Smarty 3.1.5 (Nov 20, 2011)

  • bugfix allow space between function name and open bracket (forum topic 20375)
  • bugfix different behaviour of uniqid() on cygwin. See https://bugs.php.net/bug.php?id=34908
  • bugfix {if} and {while} tags without condition did not throw a SmartyCompilerException (Issue #57)
  • bugfix multiline strings in config files could fail on longer strings (reopened Issue #55)
  • bugfix smarty_mb_from_unicode() would not decode unicode-points properly
  • bugfix use catch Exception instead UnexpectedValueException in
  • clearCompiledTemplate to be PHP 5.2 compatible
  • bugfix apostrophe in plugins_dir path name failed (forum topic 20199)
  • improvement sha1() for array keys longer than 150 characters
  • add Smarty::$allow_ambiguous_resources to activate unique resource handling (Forum Topic 20128)
  • @silenced unlink() in Smarty_Internal_Write_File since debuggers go haywire without it.
  • bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.
  • bugfix {html_select_date} and {html_select_time} did not properly handle empty time arguments (Forum Topic 20190)
  • improvement removed unnecessary sha1()
  • revert PHP4 constructor message
  • fixed PHP4 constructor message

New in Smarty 3.1.4 (Oct 20, 2011)

  • added exception when using PHP4 style constructor
  • bugfix testInstall() did not propery check cache_dir and compile_dir

New in Smarty 3.1.3 (Oct 11, 2011)

  • improvement removed html comments from {mailto} (Forum Topic 20092)
  • bugfix testInstall() would not show path to internal plugins_dir (Forum Post 74627)
  • improvement testInstall() now showing resolved paths and checking the include_path if necessary
  • bugfix html_options plugin did not handle object values properly (Issue #49, Forum Topic 20049)
  • improvement html_checkboxes and html_radios to accept nulland object values, and label_ids attribute
  • improvement removed some unnecessary count()s
  • bugfix parent pointer was not set when fetch() for other template was called on template object
  • bugfix switch lexer internals depending on mbstring.func_overload
  • bugfix start_year and end_year of {html_select_date} did not use current year as offset base (Issue #53)
  • bugfix of problem introduced with r4342 by replacing strlen() with isset()
  • add environment configuration issue with mbstring.func_overload Smarty cannot compensate for (Issue #45)
  • bugfix nofilter tag option did not disable default modifier
  • bugfix html_options plugin did not handle nulland object values properly (Issue #49, Forum Topic 20049)
  • bugfix assign() in plugins called in subtemplates did change value also in parent template
  • bugfix of problem introduced with r4342 on math plugin
  • bugfix output filter should not run on individually cached subtemplates
  • add unloadFilter() method
  • bugfix has_nocache_code flag was not reset before compilation

New in Smarty 3.1.1 (Sep 26, 2011)

  • bugfix {foreachelse} does fail if {section} was nested inside {foreach}
  • bugfix debug.tpl did not display correctly when it was compiled with escape_html = true
  • bugfix look for mixed case plugin file names as in 3.0 if not found try all lowercase
  • added $error_muting to suppress error messages even for badly implemented error_handlers
  • optimized autoloader
  • reverted ./ and ../ handling in fetch() and display() they're allowed again
  • bugfix removed debug echo output while compiling template inheritance
  • bugfix relative paths in $template_dir broke relative path resolving in {include "../foo.tpl"}
  • bugfix {include} did not work inside nested {block} tags
  • bugfix {assign} with scope root and global did not work in all cases
  • bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261
  • bugfix output filter shall not run on included subtemplates
  • bugfix template caching did not care about file.tpl in different template_dir
  • bugfix {include $file} was broken when merge_compiled_incluges = true
  • bugfix {include} was broken when merge_compiled_incluges = true and same indluded template was used in different main templates in one compilation run
  • bugfix for Smarty2 style compiler plugins on unnamed attribute passing like {tag $foo $bar}
  • bugfix debug.tpl did not display correctly when it was compiled with escape_html = true
  • bugfix lock_id for file resource would create invalid filepath
  • bugfix resource caching did not care about file.tpl in different template_dir

New in Smarty 3.1.0 (Sep 21, 2011)

  • Smarty 2 BC removed from codebase, use SmartyBC.class.php for this
  • Full UTF-8 compatibility with all plugins
  • Default Template Handler for handling non-exiting template files
  • Default Config Handler for handling non-exiting config files
  • Default Plugin Handler for handling non-exiting plugin files
  • {block hide} feature when no corresponding child block is found
  • {setfilter}{/setfilter} to apply filters to a specific block of template code
  • Improved Template Resource API
  • Improved Cache Resource API
  • Relative paths in template files {include file="../header.tpl"}
  • Access to specific $template_dir via array index
  • Access multiple template resources with extends: feature
  • Simple global HTML escapement option with escape_html property
  • Compile-Check on cache miss option
  • Automatic template recompile on Smarty upgrade
  • New Getters/Setters for main Smarty directory configuration

New in Smarty 3.0.7 (Mar 4, 2011)

  • patched vulnerability when using {$smarty.template}
  • removed assert() from config and template parser
  • bugfix the lexer/parser did fail on special characters like VT
  • bugfix of ArrayAccess object handling in internal _count() method
  • bugfix of Iterator object handling in internal _count() method
  • bugfix removed memory leak while processing compileAllTemplates
  • bugfix in {if} and {while} tag compiler when using assignments as condition and nocache mode
  • bugfix when using {$smarty.block.child} and name of {block} was in double quoted string
  • bugfix updateParentVariables() was called twice when leaving {include} processing
  • bugfix mb_str_replace in replace and escape modifiers work with utf8
  • bugfix dynamic configuration of $debugging_crtl did not work
  • bugfix default value of $config_read_hidden changed to false
  • bugfix format of attribute array on compiler plugins
  • bugfix getTemplateVars() could return value from wrong scope
  • bugfix multiple {append} tags failed to compile.
  • update do not clone the Smarty object an internal createTemplate() calls to increase performance
  • update html_options to support class and id attrs
  • bugfix added missing support of $cache_attrs for registered plugins
  • bugfix assignment as condition in {while} did drop an E_NOTICE
  • bugfix when passing an array as default parameter at {function} tag
  • bugfix {$smarty.template} in child template did not return right content
  • bugfix Smarty3 did not search the PHP include_path for template files

New in Smarty 3.0.5 (Nov 23, 2010)

  • Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior:

New in Smarty 3.0.0 (Nov 12, 2010)

  • The Smarty 3 code base is a 100% rewrite, and contains many language features that do not exist in PHP 4. This means Smarty 3 will NOT work with PHP 4. If you need PHP 4 support, you will have to stick with Smarty 2 until you can upgrade PHP.
  • Smarty's fundamental design goal remains the same: To separate application code from the presentation. This implies that PHP is separated from the presentation. A detailed explanation of why this is important can be found here.
  • Smarty has a new template parser, a real syntax lexer. This gives Smarty much finer control over its template syntax. Things like in-template math, line-precision error messages and recursive template functions are now possible.

New in Smarty 3.0 RC4 (Oct 14, 2010)

  • bugfix removed ambiguity between ternary and stream variable in template syntax
  • bugfix use caching properties of template instead of smarty object when compiling child {block}
  • bugfix {*block}...{/block*} did throw an exception in template inheritance
  • bugfix on template inheritance using nested eval or string resource in {extends} tags
  • bugfix on output buffer handling in isCached() method

New in Smarty 3.0 Beta 8 (Mar 9, 2010)

  • Refactored to a syntax geared for consistency and modularity. The Smarty 2 API syntax is still supported, but will throw a deprecation notice. You can disable the notices, but it is highly recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run through an extra rerouting wrapper.

New in Smarty 3.0 Beta 5 (Nov 30, 2009)

  • fix E_NOTICE when sessions are disabled

New in Smarty 2.6.26 (Oct 21, 2009)

  • revert super global access changes, and instead rely on USE_SUPER_GLOBALS for security

New in Smarty 2.6.21 (Dec 15, 2008)

  • fix function injection security hole closed
  • fix pass expiration time at cache_handler_fuc call in core.write_cache_file.php
  • Update of compiler.class.php to allow method chaining for PHP4 and PHP5