Mercurial > hg > rc2
comparison program/lib/Roundcube/bootstrap.php @ 21:73124dd49283
More cleaning up php8 Warnings/deprecations,
noticed that setting non-my-Dates mailboxes to sort on Date isn't sticky over ctrl-R
| author | Charlie Root |
|---|---|
| date | Thu, 09 Oct 2025 11:31:41 -0400 |
| parents | 4681f974d28b |
| children |
comparison
equal
deleted
inserted
replaced
| 20:4aec5e272733 | 21:73124dd49283 |
|---|---|
| 285 * Remove all non-ascii and non-word chars except ., -, _ | 285 * Remove all non-ascii and non-word chars except ., -, _ |
| 286 */ | 286 */ |
| 287 function asciiwords($str, $css_id = false, $replace_with = '') | 287 function asciiwords($str, $css_id = false, $replace_with = '') |
| 288 { | 288 { |
| 289 $allowed = 'a-z0-9\_\-' . (!$css_id ? '\.' : ''); | 289 $allowed = 'a-z0-9\_\-' . (!$css_id ? '\.' : ''); |
| 290 return preg_replace("/[^$allowed]/i", $replace_with, $str); | 290 return preg_replace("/[^$allowed]/i", $replace_with, ($str??'')); |
| 291 } | 291 } |
| 292 | 292 |
| 293 /** | 293 /** |
| 294 * Check if a string contains only ascii characters | 294 * Check if a string contains only ascii characters |
| 295 * | 295 * |
