#31951 closed defect (bug) (fixed)
WP_Press_This::_limit_string() needs to check if mb_strlen() is available
Reported by: | ocean90 | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Press This | Keywords: | needs-patch |
Focuses: | Cc: |
Description
trunk/src/wp-admin/includes/class-wp-press-this.php@32106#L329
WP_Press_This::_limit_string()
uses mb_strlen()
but mbstring can be disabled. Therefore we need a check if the function exists.
mb_substr()
is not affected because we provide a compat version.
Related: #30633
Attachments (2)
Change History (7)
This ticket was mentioned in Slack in #core by drew. View the logs.
9 years ago
#3
@
9 years ago
31951.1.patch is the function_exists()
check. The result is stored in a static to reduce calls to it.
I'm 50/50 on which to use. 31951.patch would be better for the long run, not sure if we should be introducing it right before RC.
Note: See
TracTickets for help on using
tickets.
If we need a compat function, 31951.patch (from #29573) is similar to our current
mb_substr()
compat implementation.Otherwise, just need a
function_exists()
check.