[wp-trac] [WordPress Trac] #51773: wp_guess_url() calls strpos() incorrectly if $_SERVER['SCRIPT_FILENAME'] is empty
WordPress Trac
noreply at wordpress.org
Fri Nov 13 15:59:06 UTC 2020
#51773: wp_guess_url() calls strpos() incorrectly if $_SERVER['SCRIPT_FILENAME'] is
empty
--------------------------+-----------------------------
Reporter: bjorsch | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This can happen, for example, if using PHPUnit's `@runInSeparateProcess`.
The message produced is
{{{
PHP Warning: strpos(): Empty needle in /var/www/html/wp-
includes/functions.php on line 5435
}}}
In the aforementioned PHPUnit case, that warning causes tests to fail.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51773>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list