Simon Wisselink
44e00cf7c0
muteUndefinedOrNullWarnings() now also mutes PHP8 warnings for undefined properties
2023-07-19 12:05:45 +02:00
Simon Wisselink
fe7817c301
version bump
2023-03-28 21:47:01 +02:00
Simon Wisselink
e75165565e
Implement fix and tests
2023-03-24 12:19:34 +01:00
Adrien Poupa
5988116c81
PHP 8.1 deprecation warnings on null strings in modifiers ( #834 )
2023-01-17 00:24:23 +01:00
Simon Wisselink
a34ee98e21
Allow dereferencing of non-objects accross all supported PHP versions ( #832 )
...
Fixes #831
2022-11-24 18:44:19 +01:00
Simon Wisselink
c0a6b641bf
Treat undefined vars and array access of a null or false variables equivalent across all supported PHP versions ( #830 )
...
* Added test to see what changed exactly
* Treat undefined vars and array access of a null or false variables
equivalent across all supported PHP versions
* Removed 2 tests that produce inconsistent results between PHP7.x versions.
* Fix regex matching for slightly different error message for php7.1
2022-11-24 09:43:51 +01:00
Simon Wisselink
044647bd71
Also mute php7 notices for undefined array indexes when muteUndefinedOrNullWarnings is activated. ( #829 )
...
Fixes #736
2022-11-23 23:26:24 +01:00
Simon Wisselink
67ab8f6879
version bump
2022-11-22 22:47:30 +01:00
Simon Wisselink
773b3b4b7c
Change file permissions for directories and respect umask for written files. ( #828 )
...
Fixes #548
Fixes #819
2022-11-22 22:31:54 +01:00
Hunman
613c5d691c
Make SmartyCompilerException play nicer with error handler libraries ( #782 )
...
* Make SmartyCompilerException play nicer with error handler libraries
Added a new constructor, which accepts a filename and a line number too
(similar to ErrorException, except no severity parameter)
This way error handlers will display the correct file's correct line as
the source of the exception, instead of the template's line in the
core of the parser (php file)
Kept the __toString() method, but removed $source, $desc, and $template
* Revert the breaking changes
2022-11-22 21:58:13 +01:00
Progi1984
c016895166
PHP8.2 compatibility ( #775 )
...
* PHP8.2 compatibility
* PHP8.2 compatibility : Fixed unit tests
* PHP8.2 compatibility : Replace ENT_COMPAT by ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
* PHP8.2 compatibility : Remove deprecated utf8_decode
* PHP8.2 compatibility : Remove HTML-ENTITIES parameter
* Removed some unused code for clarity, updated the changelog.
* More concise escape implementation and unit test to cover both modifierplugin and modifiercompiler.
* Fix htmlall unescape of quotes without mbstring too
Co-authored-by: Simon Wisselink <s.wisselink@iwink.nl >
2022-11-22 21:22:57 +01:00
Simon Wisselink
254b5cabee
Dropped remaining references to removed PHP-support in Smarty 4 from docs, lexer and security class.
2022-09-27 12:21:01 +02:00
Raimondas Rimkevičius
1b556c7077
Use __DIR__ instead of dirname(__FILE__) ( #817 )
2022-09-27 12:03:34 +02:00
Simon Wisselink
4550fc0339
Using PHP functions as modifiers now triggers a deprecation notice ( #814 )
...
Fixes #813
2022-09-23 00:09:00 +02:00
Scott Newton
4fc39d59a5
Bug fix for underscore in template name ( #581 )
...
* Corrected bug #578 , where underscore characters were being stripped from template names when using a custom resource
* Increased the maximum template name length to 127 characters when using a custom resource
2022-09-22 23:56:18 +02:00
Alec Smecher
0fb29024e7
#155 Adapt Smarty upper/lower functions to be codesafe (e.g. for Turkish locale) ( #586 )
...
* Implemented locale safe strotoupper, strolower and ucfirst functions for translating user string to filenames etc.
Fixes #155
Co-Authored-By: Alexkurd <7689609+Alexkurd@users.noreply.github.com >
2022-09-22 23:32:55 +02:00
Simon Wisselink
612bd3f657
Fixed PHP8.1 deprecation errors in strip_tags ( #803 )
2022-09-22 14:55:20 +02:00
Mathias
b91c04bfcf
Fixed PHP8.1 deprecation errors passing null to parameter in trim ( #807 )
...
Fixed a PHP 8.1 deprecation error: trim(): Passing null to parameter #1 ($string) of type string is deprecated in cacheresource_keyvaluestore.php on line 247 and in cacheresource_keyvaluestore.php on line 431
2022-09-22 14:29:51 +02:00
Simon Wisselink
c53342c9fc
Silence deprecation errors for strtime in PHP8.1 or higher
...
Fixes #672 (#811 )
2022-09-22 14:11:36 +02:00
Jonathan Stoll
45345e75ec
Fix Variable Usage ( #808 )
...
Fix Variable Usage in Exception message when unable to load subtemplate
2022-09-21 21:54:41 +02:00
Storyxx
db80246b58
fix compilation for caching templates ( #801 )
2022-09-18 17:15:56 +02:00
Hypolite Petovan
d683641f90
Fix wrong indentation in libs/plugins/modifier.capitalize.php ( #802 )
2022-09-18 11:14:59 +02:00
Simon Wisselink
e2e68b3622
clean output buffer for Throwable instead of just Exception ( #797 )
...
Fixes #514
2022-09-14 13:47:36 +02:00
Simon Wisselink
c693d81370
version bump
2022-09-14 12:58:59 +02:00
Simon Wisselink
813c83f7a3
Fixed unselected year/month/day not working in html_select_date
...
Fixes #395
2022-09-14 12:44:37 +02:00
Simon Wisselink
55ea25d1f5
Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks
...
Fixes #454
2022-09-14 11:38:18 +02:00
Simon Wisselink
d304d349b4
Fixed PHP8.1 deprecation errors in capitalize modifier
...
Fixes #789
2022-09-13 12:19:44 +02:00
Simon Wisselink
5479e3362c
Fixed use of rand()
without a parameter in math function ( #795 )
...
* Fixed use of `rand()` without a parameter in math function
Fixes #794
2022-09-12 12:13:42 +02:00
Simon Wisselink
f8f97b4e2d
Fixed PHP8.1 deprecation errors in upper modifier #788
2022-09-10 12:34:20 +02:00
Mark Fettig
1bc7c722a3
address PHP 8.1 'explode', 'number_format', and 'replace' deprecations ( #755 )
2022-09-09 22:39:24 +02:00
Simon Wisselink
ed454551a3
version bump
2022-08-01 23:57:36 +02:00
Simon Wisselink
f4b26a3cbf
Fixed second param of unescape modifier ( #778 )
...
Fixes #777
2022-08-01 23:49:19 +02:00
Simon Wisselink
20a8026ccd
Merge branch 'fix-issue-549-v3' of github.com:AnrDaemon/smarty into AnrDaemon-fix-issue-549-v3 ( #771 )
2022-07-19 22:55:07 +02:00
Simon Wisselink
d6ac3297df
Merge branch 'master' of github.com:JonisoftGermany/smarty into JonisoftGermany-master
2022-07-17 00:53:25 +02:00
Simon Wisselink
560475a2f2
Do not use obsolete smarty properties '_dir_perms', '_file_perms', 'plugin_search_order' in our own code. ( #772 )
2022-07-17 00:13:57 +02:00
Gunnar Kreitz
382d66305d
Fix PHP 8.1 htmlspecialchars deprecation ( #766 )
2022-07-14 23:51:26 +02:00
Simon Wisselink
78f0cf5f65
version bump
2022-05-17 14:56:26 +02:00
Simon Wisselink
05f1a7deda
Replace '*/' in user supplied input in C-style comments with '* /'.
2022-05-16 12:34:49 +02:00
Simon Wisselink
a6711b3833
Merge pull request #727 from liborm85/escape-modifier-fix
...
PHP 8.1: fix deprecation in escape modifier
2022-04-26 22:11:33 +02:00
Jorge Sá Pereira
962f266483
Fix PHP 8.1 deprecated warning when calling rtrim
...
Fixes - Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
2022-03-10 02:06:00 +00:00
Libor M
a2e1df1768
PHP 8.1: fix deprecation in escape modifier
2022-02-08 13:30:19 +01:00
Simon Wisselink
3cc56392c6
prevent float to int cast deprecation warning in truncate modifier
...
Fixes #699
2022-02-06 22:20:05 +01:00
Simon Wisselink
f90348971b
Merge pull request #722 from kochichi/bugfix/721
...
math equation return warning: max(x, y)
2022-02-06 21:54:54 +01:00
Simon Wisselink
265cf4f3bc
version bump
2022-02-06 21:34:26 +01:00
Pavel Kochman
02633ecaba
math equation return warning: math: illegal character for : {math equation="max(x, y)" x=$x y=$y}
2022-02-04 21:03:25 +01:00
Thomas A. Hirsch
277648b81c
Cherry-picked from da76d927ed
...
Co-Authored-By: Thomas BACCELLI <tbaccelli@gmail.com >
2022-01-18 15:56:23 +01:00
Thomas A. Hirsch
8d3a7af308
Cherry-picked from da76d927ed
...
Co-Authored-By: Thomas BACCELLI <tbaccelli@gmail.com >
2022-01-18 15:56:23 +01:00
Simon Wisselink
995b7eb36f
version bump
2022-01-18 00:17:17 +01:00
Claas Augner
059bea274c
Support multiple operators in math equations ( #708 )
...
* fix(math): fix equation regexp
Fixes #702 .
2022-01-18 00:10:17 +01:00
Simon Wisselink
ace1c8e90f
version bump
2022-01-10 10:52:13 +01:00