Commit cf87925
committed
bug #4724 Avoid ord deprecation notice in PHP 8.5 (iquito)
This PR was merged into the 3.x branch.
Discussion
----------
Avoid ord deprecation notice in PHP 8.5
Change the one usage of `ord()` in Twig where a multibyte character can trigger the new deprecation in PHP 8.5, which is in the `html_attr` escape functionality in EscaperRuntime, currently leading to:
```
ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead"
```
This small change fixes it. There are no other usages of `ord()` in Twig which lead to this deprecation notice.
Commits
-------
4d98cce Avoid ord deprecation in PHP 8.51 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
0 commit comments