#51172 closed defect (bug) (duplicate)
l10n.php missing validation
| Reported by: | vickdini | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | I18N | Version: | 5.5 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
Hi! I was updating an automation script and, while debugging, I noticed that the line 1075 of the file \wp-includes\l10n.php performs a comparison operation between two array elements before verifying the existence of both (i.e. one is verified, the other isn't and this one throws an error):
Current line 1075:
} elseif ( ! isset( $src_url['host'] ) || $src_url['host'] === **$site_url['host']** ) {
Proposed change:
} elseif ( ! isset( $src_url['host'] ) **|| ! isset( $site_url['host'] )** || $src_url['host'] === $site_url['host'] ) {
I hope this helps.
Best regards,
Vick
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi! I was updating an automation script and, while debugging, I noticed that the line 1075 of the file \wp-includes\l10n.php performs a comparison operation between two array elements before verifying the existence of both (i.e. one is verified, the other isn't and this one throws an error):
Current line 1075:
} elseif ( ! isset( $src_url['host'] ) || $src_url['host'] === $site_url['host'] ) {Proposed change:
} elseif ( ! isset( $src_url['host'] ) || ! isset( $site_url['host'] ) || $src_url['host'] === $site_url['host'] ) {I hope this helps.
Best regards,
Vick