Opened 13 months ago
Closed 13 months ago
#60823 closed defect (bug) (fixed)
Font Library: `mb_strtolower()` throws fatal without the optional `mbstring` PHP extension installed.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch commit fixed-major dev-reviewed |
Focuses: | Cc: |
Description
WP_Font_Utils::get_font_face_slug()
method includes an unconditional call to the function mb_strtolower()
.
As the mbstring PHP package is optional this should be wrapped by a function_exists()
check and fall back to strtolower()
if the function is not available.
- Visit https://playground.wordpress.net/?wp=nightly
- Click Edit Site in the toolbar
- Proceed to open the Font Library Model via the styles editor
- Open the browser console
- Upload a font file (that playground doesn't upload doesn't matter)
- Observe the fatal error shown in the console:
PHP Fatal error: Uncaught Error: Call to undefined function mb_strtolower() in /wordpress/wp-includes/fonts/class-wp-font-utils.php
Change History (9)
This ticket was mentioned in Slack in #core-editor by peterwilsoncc. View the logs.
13 months ago
This ticket was mentioned in PR #6306 on WordPress/wordpress-develop by @mujuonly.
13 months ago
#3
- Keywords has-patch added
Font Library: mb_strtolower()
throws fatal without the optional mbstring
PHP extension installed.
Trac ticket: https://core.trac.wordpress.org/ticket/60823
Reported by @peterwilsoncc
#5
@
13 months ago
- Owner set to swissspidy
- Resolution set to fixed
- Status changed from new to closed
In 57865:
@swissspidy commented on PR #6306:
13 months ago
#6
#7
@
13 months ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Note: See
TracTickets for help on using
tickets.
Related: #55603