[wp-trac] [WordPress Trac] #51172: l10n.php missing validation
WordPress Trac
noreply at wordpress.org
Fri Aug 28 10:09:27 UTC 2020
#51172: l10n.php missing validation
-----------------------------+------------------------
Reporter: vickdini | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Upgrade/Install | Version: 5.5
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
-----------------------------+------------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Old description:
> 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
New description:
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
--
Comment:
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #49145.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51172#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list