[wp-meta] [Making WordPress.org] #7421: PHP Deprecated notice in Readme Parser
Making WordPress.org
noreply at wordpress.org
Wed Jan 24 06:26:00 UTC 2024
#7421: PHP Deprecated notice in Readme Parser
------------------------------+--------------------
Reporter: rabmalin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Keywords:
------------------------------+--------------------
PHP: 8.2
Ref:
https://github.com/WordPress/wordpress.org/blob/trunk/wordpress.org/public_html
/wp-content/plugins/plugin-directory/readme/class-parser.php#L247
When checked with minimal text file, `$line` could be empty. So PHP notice
is generated.
Example error message for reference:
{{{
Deprecated: str_contains(): Passing null to parameter #1 ($haystack) of
type string is deprecated in /var/www/html/wp-content/plugins/plugin-
check/vendor/afragen/wordpress-plugin-readme-parser/class-parser.php on
line 247
Deprecated: str_contains(): Passing null to parameter #1 ($haystack) of
type string is deprecated in /var/www/html/wp-content/plugins/plugin-
check/vendor/afragen/wordpress-plugin-readme-parser/class-parser.php on
line 247
}}}
Sample readme file:
{{{
=== Hello World ===
}}}
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7421>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list