Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42385 invoked from network); 24 Jul 2008 18:16:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2008 18:16:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=jordan@wambaugh.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jordan@wambaugh.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wambaugh.org from 66.249.82.224 cause and error) X-PHP-List-Original-Sender: jordan@wambaugh.org X-Host-Fingerprint: 66.249.82.224 wx-out-0506.google.com Received: from [66.249.82.224] ([66.249.82.224:36831] helo=wx-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/9A-22699-3F6C8884 for ; Thu, 24 Jul 2008 14:16:20 -0400 Received: by wx-out-0506.google.com with SMTP id s12so904993wxc.26 for ; Thu, 24 Jul 2008 11:16:17 -0700 (PDT) Received: by 10.70.19.7 with SMTP id 7mr667723wxs.7.1216923376046; Thu, 24 Jul 2008 11:16:16 -0700 (PDT) Received: from ?10.68.14.27? ( [204.154.43.244]) by mx.google.com with ESMTPS id i16sm7843583wxd.25.2008.07.24.11.16.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 24 Jul 2008 11:16:15 -0700 (PDT) Message-ID: <995EBD8C-D225-4AE8-9C41-331422B0ACF3@wambaugh.org> To: PHP Internals In-Reply-To: <7AFF263C3DBE2549899F71BB925794FF0492A872@sullivan.smartertravelmedia.com> Content-Type: multipart/alternative; boundary=Apple-Mail-23-245490433 Mime-Version: 1.0 (Apple Message framework v926) Date: Thu, 24 Jul 2008 14:16:15 -0400 References: <7AFF263C3DBE2549899F71BB925794FF0492A863@sullivan.smartertravelmedia.com> <48884251.1020300@gmx.net> <7AFF263C3DBE2549899F71BB925794FF0492A865@sullivan.smartertravelmedia.com> <4888931D.6080405@gmx.net> <7AFF263C3DBE2549899F71BB925794FF0492A86F@sullivan.smartertravelmedia.com> <96d7f8680807240822o489292dbyc8a9b45de95acf63@mail.gmail.com> <7AFF263C3DBE2549899F71BB925794FF0492A872@sullivan.smartertravelmedia.com> X-Mailer: Apple Mail (2.926) Subject: Re: [PHP-DEV] question about backward-compatibility break/bug in php 5.2.6 From: jordan@wambaugh.org (Jordan Wambaugh) --Apple-Mail-23-245490433 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jul 24, 2008, at 11:30 AM, Jack Steadman wrote: > The upshot is that we can't actually rely on strtotime to determine > whether a string is a valid date/time. The docs don't ever explicitly > say that the date strings themselves are checked for validity, but > returning false on "failure" implies to me that it will return false > if > it can't get a *valid* date out of the string. -62169966000 is a valid date. Perhaps instead of checking if strtotime returns a false for your error condition, check if it returns a value < 1. -- Jordan CM Wambaugh Lead Software Engineer Forrent Media Solutions jordan.wambaugh@forrent.com --Apple-Mail-23-245490433--