[wp-trac] [WordPress Trac] #61895: null passed to `wp-includes/pomo/po.php` in certain instances when using GlotPress 4.0.1
WordPress Trac
noreply at wordpress.org
Sun Aug 18 21:48:12 UTC 2024
#61895: null passed to `wp-includes/pomo/po.php` in certain instances when using
GlotPress 4.0.1
--------------------------+-----------------------------------------
Reporter: afragen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: normal | Keywords: has-patch dev-feedback php8
Focuses: |
--------------------------+-----------------------------------------
I have a GlotPress installation running WP 6.6.1 and GlotPress 4.0.1. When
I look at my debug log it is littered with the following errors.
{{{
PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type
string is deprecated in /sites/xxx/files/wp-includes/pomo/po.php on line
270
PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type
string is deprecated in /sites/xxx/files/wp-includes/pomo/po.php on line
271
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of
type array|string is deprecated in /sites/xxx/files/wp-
includes/pomo/po.php on line 127
}}}
It is clear that something is passing `null` into these specific lines. I
have added some modified error checking and a cast to alleviate these
issues.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61895>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list