WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #31809, comment 4


Ignore:
Timestamp:
06/26/2018 11:36:20 AM (16 months ago)
Author:
Rarst
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31809, comment 4

    initial v1  
    11I am hesitant about issue as reported. The function is clearly documented to accept non-nullable string in `Y-m-d H:i:s` format. Passing it `null` does not seem to be either explicitly or implicitly meaningful.
    22
    3 Returning current date is a case for invalid input, which ''is'' confusing as for me, but that's how it is written as of right now. I do not see how returning ''current'' time ''for invalid input'' is especially more meaningful or desired. It’s an error case. If anything it should probably fail altogether on it, but backwards compatibility.
     3Returning "zero" date is a case for invalid input, which ''is'' confusing as for me, but that's how it is written as of right now. I do not see how returning ''current'' time ''for invalid input'' is especially more meaningful or desired. It’s an error case. If anything it should probably fail altogether on it, but backwards compatibility.
    44
    55What are the good reasons here to change behavior in such way?