|   | 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] dsp@php.net
  [2013-09-16 21:36 UTC] dsp@php.net
 
-Status: Open
+Status: Closed
  [2014-10-07 23:17 UTC] stas@php.net
  [2014-10-07 23:28 UTC] stas@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 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 )