Commit Graph

150 Commits

Author SHA1 Message Date
Darek Krzysztofiak cd962280ce Fix for php 8.0 (#687)
* Fix PHP 8.0
$parts must be an array, because the argument for count() must be countable, mb_split() returns an array or a boolean.
2021-12-03 17:13:52 +01:00
Simon Wisselink 39b69f0142 Feature/php8 support (#629)
Adds support for PHP8.0, dropping support for PHP7.0 and below.

Backwards incompatible changes:
- Dropped support for php asp tags in templates (removed from php since php7.0)
- Dropped deprecated API calls that where only accessible through SmartyBC
- Dropped support for {php} and {include_php} tags and embedded PHP in templates. Embedded PHP will now be passed through as is.
- Removed all PHP_VERSION_ID and compare_version checks and conditional code blocks that are now no longer required
- Dropped deprecated SMARTY_RESOURCE_CHAR_SET and SMARTY_RESOURCE_DATE_FORMAT constants
- Dropped deprecated Smarty::muteExpectedErrors and Smarty::unmuteExpectedErrors API methods
- Dropped deprecated $smarty->getVariable() method. Use $smarty->getTemplateVars() instead.
- $smarty->registerResource() no longer accepts an array of callback functions

See the changelog for more details.

Switched CI from Travis to Github CI.
2021-10-13 12:15:17 +02:00
Simon Wisselink 3b0fd82849 Merge branch 'escape' of https://github.com/m-haritonov/smarty into m-haritonov-escape 2021-08-19 15:26:27 +02:00
David Goodwin 039043e5a2 Update modifier.escape.php (#649)
trigger a notice if an incorrect modifier was used (E.g.|escape:quotes vs |escape:quote).
2021-03-21 21:21:55 +01:00
Mihail Haritonov 9cde36e3bc plugins: escape: javascript escaping secure fix 2021-02-28 16:44:56 +03:00
uwetews b05bc1b617 - bugfix in date-format modifier; NULL at date string or default_date did not produce correct output
https://github.com/smarty-php/smarty/pull/458
2018-10-11 09:22:23 +02:00
uwetews 4f7cd8f1b3 - reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483 2018-08-31 16:45:09 +02:00
uwetews 799b5cb342 - fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452
https://github.com/smarty-php/smarty/pull/475
    https://github.com/smarty-php/smarty/pull/473
  - bugfix PHP5.2 compatibility https://github.com/smarty-php/smarty/pull/472
2018-08-19 02:35:46 +02:00
Sławomir Kaleta 2404095783 Update PSR-2 2018-06-12 09:58:15 +02:00
Uwe Tews 860ebb618e - bugfix plugins may not be loaded if {function} or {block} tags are executed in nocache mode 2018-03-28 07:35:52 +02:00
Uwe Tews 96fd914cc1 bugfix rework of newline spacing between tag code and template text.
now again identical with Smarty2 (forum topic 26878)
2017-11-20 04:07:51 +01:00
Uwe Tews 654659aadf remove html tags from PHPDoc blocks 2017-11-11 07:11:33 +01:00
Uwe Tews 3fc8abeb98 code cleanup and optimizations 3.1.32-dev-34 2017-11-06 01:02:56 +01:00
Uwe Tews dd9c076dfa - correction of PHPDoc blocks
- minor code cleanup
2017-10-26 10:25:41 +02:00
Uwe Tews db16d0d2e6 fixed typo 2017-08-06 02:58:05 +02:00
Uwe Tews 5cc9b27784 - bugfix wordwrap modifier could fail if used in nocache code.
converted plugin file shared.mb_wordwrap.php into modifier.mb_wordwrap.php
2017-08-05 19:59:23 +02:00
uwetews e51b0ac4af - performance store flag for already required shared plugin functions in static variable or
Smarty's $_cache to improve performance when plugins are often called
    https://github.com/smarty-php/smarty/commit/51e0d5cd405d764a4ea257d1bac1fb1205f74528#commitcomment-22280086
2017-05-27 11:04:00 +02:00
klemens 51a0e764e8 spelling fixes 2017-04-08 12:10:39 +02:00
uwetews e62b40c421 - improvement {math} misleading E_USER_WARNING messages when parameter value = null https://github.com/smarty-php/smarty/issues/288 2016-09-11 00:23:37 +02:00
uwetews 7e230713c6 - improvement {math} misleading E_NOTICE messages when parameter value = null https://github.com/smarty-php/smarty/issues/288 (reverted from commit 810881c76e) 2016-09-11 00:21:45 +02:00
uwetews 810881c76e - improvement {math} misleading E_NOTICE messages when parameter value = null https://github.com/smarty-php/smarty/issues/288 2016-09-11 00:13:29 +02:00
uwetews 51e0d5cd40 - performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280 2016-09-06 04:26:46 +02:00
uwetews e1d27d68d7 - performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280 2016-09-02 01:08:50 +02:00
uwetews 2003020df9 - bugfix remove constant DS as shortcut for DIRECTORY_SEPARATOR as the user may have defined it to something else https://github.com/smarty-php/smarty/issues/277 2016-08-23 08:03:39 +02:00
uwetews eb2d9d4e6d - improvement remove double funtion declaration in plugin shared.escape_special_cars.php https://github.com/smarty-php/smarty/issues/229 2016-07-23 22:37:17 +02:00
uwetews 50068ca52a - bugfix {match} shell injection vulnerability patch provided by Tim Weber 2016-07-19 20:17:47 +02:00
uwetews 608064e5f2 -bugfix Only variables should be assigned by reference https://github.com/smarty-php/smarty/issues/227 2016-05-07 13:46:37 +02:00
uwetews 3756588858 - improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
https://github.com/smarty-php/smarty/pull/181
2016-02-11 22:05:45 +01:00
uwetews b04486a091 - reformat all code for unique style 2016-02-09 01:27:15 +01:00
uwetews 8b0e0a3df6 - improvement observe Smarty::$_CHARSET in debugging console https://github.com/smarty-php/smarty/issues/169 2016-01-26 00:15:39 +01:00
uwetews 2cab5c74ff fix link to documentation 2015-12-13 14:50:11 +01:00
uwetews c08191d191 replace property array by object properties 2015-08-09 20:45:28 +02:00
Uwe Tews 3d2a15be3c - update DateTime object can be instance of DateTimeImmutable since PHP5.5 https://github.com/smarty-php/smarty/pull/75 2015-08-01 13:09:41 +02:00
Maxime Mérian 73dc3f311a Added $limit parameter to regex_replace modifier 2015-07-07 09:32:40 +02:00
Uwe Tews e5bea506af - bugfix debugging console did not display string values containing \n, \r or \t correctly https://github.com/smarty-php/smarty/issues/66 2015-07-01 10:54:45 +02:00
Uwe Tews b8eb8784d4 - bugfix output filter trimwhitespace could run into the pcre.backtrack_limit on large output (code.google issue 220) 2015-05-20 04:26:29 +02:00
Uwe Tews 740a583c7c Use require_once 2015-01-07 16:46:03 +01:00
Uwe Tews 158b7be58a Debug Console Update
- bugfix Debug Console did not show included subtemplates since 3.1.17
(forum 25301)
- bugfix Modifier debug_print_var did not limit recursion or prevent
recursive object display at Debug Console
(ATTENTION: parameter order has changed to be able to specify maximum
recursion)
- bugfix Debug consol did not include subtemplate information with
$smarty->merge_compiled_includes = true
- improvement The template variables are no longer displayed as objects
on the Debug Console
- improvement $smarty->createData($parent = null, $name = null) new
optional name parameter for display at Debug Console
- addition of some hooks for future extension of Debug Console
2014-11-03 22:27:32 +01:00
Uwe.Tews@googlemail.com 9307f0cfcb - bugfix modifier wordwrap did output break string wrong if first word was exceeding lenght with cut = true (topic 25193) 2014-08-02 15:24:28 +00:00
monte.ohrt 4b3e1eb89d fix url in comment 2014-07-01 19:33:25 +00:00
Uwe.Tews@googlemail.com 0e1f7fdcfc - bugfix {html_image} security check did fail on files relative to basedir (Issue 191) 2014-06-08 19:03:39 +00:00
Uwe.Tews@googlemail.com 425091a19f - fixed spelling, PHPDoc , minor errors, code cleanup 2014-06-06 02:40:04 +00:00
Uwe.Tews@googlemail.com f242ce30fb - bugfix shared.literal_compiler_param.php did throw an exception when literal did contain a '-' (smarty-developers group) 2014-02-05 19:39:21 +00:00
Uwe.Tews@googlemail.com 5dc4b61771 - bugfix correction of modifier capitalize fix from 3.10.2013 (issue 159) 2013-10-28 23:56:41 +00:00
Uwe.Tews@googlemail.com 655a2d9301 - bugfix loops using modifier capitalize did eat up memory (issue 159) 2013-10-03 09:16:27 +00:00
Uwe.Tews@googlemail.com a0dcb5611b - bugfix html_select_time defaulting error for the Meridian dropdown (forum topic 24549) 2013-09-13 20:48:40 +00:00
Uwe.Tews@googlemail.com 00ccae8857 - update for PHP 5.4 compatibility
- reformat source to PSR-2 standard
2013-07-14 22:15:45 +00:00
monte.ohrt a0f26a96cc fix order of replacements (mohrt) 2013-07-02 14:11:12 +00:00
Uwe.Tews@googlemail.com 0643bf9808 - bugfix removed PHP 5.5 deprecated preg_replace /e option in modifier capitalize (forum topic 24389) 2013-06-26 22:21:17 +00:00
Uwe.Tews@googlemail.com 6b5b06564f - 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)
2013-05-21 21:01:23 +00:00