Commit d27d54e
fix: Utf8_truncate crashes on empty strings due to off-by-one-error
`WARNING: [pool grommunio-sync-pool] child 111823 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) in /usr/share/grommunio-sync/lib/utils/utils.php:352"`
When $string is empty the value $offset will be set to `-1`, which is not a valid position for strrpos.1 parent a9cb4a4 commit d27d54e
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
338 | 343 | | |
339 | 344 | | |
340 | 345 | | |
| |||
0 commit comments