[wp-trac] [WordPress Trac] #16773: Unescaped preg_match breaks with PHP 5.3 Namespaced Widget Classes.
WordPress Trac
noreply at wordpress.org
Sun Jan 15 04:54:25 UTC 2017
#16773: Unescaped preg_match breaks with PHP 5.3 Namespaced Widget Classes.
-------------------------------------------------+-------------------------
Reporter: 5ubliminal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Widgets | Review
Severity: minor | Version: 3.1
Keywords: has-patch needs-unit-tests needs- | Resolution:
testing | Focuses:
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:9 westonruter]:
> The use of `strtolower()` should be retained because PHP class names
should be have capitalized words. So to ensure that `WP_Widget_Foo`
becomes `foo` as the default `$id_base`, use `strtolower()`.
`sanitize_key()` [source:tags/4.7.1/src/wp-
includes/formatting.php?marks=1881#L1869 already does that], adding a
second call seems redundant.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16773#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list