[wp-trac] [WordPress Trac] #28992: mysql2date() return empty string not false
WordPress Trac
noreply at wordpress.org
Wed Jul 23 00:14:35 UTC 2014
#28992: mysql2date() return empty string not false
--------------------------+-----------------------------
Reporter: pbearne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
If you pass a empty date string or bad date to mysql2date() we get a empty
string back
e.g.
mysql2date( 'Y-m-d', "" )
mysql2date( 'Y-m-d', 'i am not a date' )
see the unit tests for more examples
I have created patch to return false if it not going to return a date as
this is safer i belive
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28992>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list