Opened 3 years ago
Closed 3 years ago
#53282 closed defect (bug) (fixed)
"A non-numeric value encountered" warning when checking mbstring.func_overload
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Reported by @djbu on support forums.
If a web host has the mbstring.func_overload
PHP value set to something other than a numeric string (e.g. an empty string instead of the default '0'
value), you'll see warnings like this in the error log:
PHP Warning: A non-numeric value encountered in .../wp-includes/functions.php on line 6746 PHP Warning: A non-numeric value encountered in .../wp-includes/pomo/streams.php on line 21
This is obviously an edge case, but we can easily avoid the warning by casting the value to (int)
before checking.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 51032: