|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [1999-10-13 01:50 UTC] jah at cvs dot php dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 20:00:01 2025 UTC | 
In _php3_date, the for loop that determines the size of the string to create is missing a case for 'g', causing the calculated size to be off by one. The problem only appears to show up under Linux (making me think there's something else wrong as well). The PHP code that caused the problem was: $fo = date( "D, M d, Y @ g:i a", $ts ) ; I only discovered it after rigorous debugging, as it doesn't cause a seg fault all the time. It would only occur if the hour ('g') and the day of the month ('d') was greater than 9, and it wouldn't always occur then (I don't know why). To work around it, I added an extra space at the end of the 'a'.