[wp-trac] [WordPress Trac] #24106: Simplify wp_slash()
WordPress Trac
noreply at wordpress.org
Sat Jul 11 00:12:14 UTC 2020
#24106: Simplify wp_slash()
-------------------------------------------------+-------------------------
Reporter: TobiasBg | Owner: whyisjake
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.5
Component: Formatting | Version: 3.6
Severity: normal | Resolution: fixed
Keywords: has-patch needs-unit-tests dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Changes (by whyisjake):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"48433" 48433]:
{{{
#!CommitTicketReference repository="" revision="48433"
Formatting: Prevent wp_slash from returning non-strings as strings.
If a bool/float/int is passed into wp_slash it will be coerced into a
string.
This changes the behavior to only slash strings. At the same time, handles
recursion a little nicer by calling array_map for arrays.
Fixes #42195, #24106.
Props johnbillion, andizer, jrf, ryotasakamoto, SergeyBiryukov, donmhico,
TobiasBg, markoheijnen, ryan, nacin, devesine, whyisjake.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24106#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list