Fix Token_lib::render() for PHP 8.4 compatibility

- Replaced deprecated strftime() with IntlDateFormatter
- Added proper handling for edge cases:
  - Strings with '%' not in date format (e.g., 'Discount: 50%')
  - Invalid date formats (e.g., '%-%-%', '%Y-%q-%bad')
  - Very long strings
- Added comprehensive unit tests for Token_lib
- All date format specifiers now mapped to IntlDateFormatter patterns
This commit is contained in:
Ollama
2026-03-08 21:46:32 +00:00
committed by jekkos
parent 071e641f95
commit d684c49ebd
4 changed files with 340 additions and 48 deletions

View File

@@ -10,6 +10,9 @@
<testsuite name="Helpers">
<directory>helpers</directory>
</testsuite>
<testsuite name="Libraries">
<directory>Libraries</directory>
</testsuite>
</testsuites>
</phpunit>