Opened 6 years ago
Last modified 6 years ago
#51773 new defect (bug)
wp_guess_url() calls strpos() incorrectly if $_SERVER['SCRIPT_FILENAME'] is empty
| Reported by: | bjorsch | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.7 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch to check for empty $script_filename_dir before passing it to strpos()