[wp-trac] [WordPress Trac] #43977: Fix error-prone string to array parsing

WordPress Trac noreply at wordpress.org
Sat Jul 21 12:48:27 UTC 2018


#43977: Fix error-prone string to array parsing
------------------------------+-----------------------
 Reporter:  flixos90          |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  5.0
Component:  General           |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  needs-unit-tests  |     Focuses:  rest-api
------------------------------+-----------------------
Changes (by sstoqnov):

 * keywords:  needs-patch needs-unit-tests => needs-unit-tests


Comment:

 If we pass PREG_SPLIT_NO_EMPTY to `preg_split`, it will remove the empty
 values. I ran few tests that confirmed that.

 I will also try to provide unit tests soon.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43977#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list