|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2013-09-16 21:36 UTC] [email protected]
[2013-09-16 21:36 UTC] [email protected]
-Status: Open
+Status: Closed
[2014-10-07 23:17 UTC] [email protected]
[2014-10-07 23:28 UTC] [email protected]
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 02 13:00:02 2026 UTC |
Description: ------------ Parsing invalid, single-digit input, for seconds using the 's' format reports confusing and incorrect error message: "A two second minute could not be found" caused probably by copying the error message for minutes ("A two digit minute could not be found") but replacing wrong word with "second". Actually experienced in 5.3.10 but the error message is present also in the source code for 5.3.21 (I can't get my hands on this version). Test script: --------------- <?php DateTime::createFromFormat('s', '0'); $lastErrors = DateTime::getLastErrors(); print_r($lastErrors['errors']); Expected result: ---------------- Array ( [0] => A two digit second could not be found ) Actual result: -------------- Array ( [0] => A two second minute could not be found )