#20527 [NEW]: unixdate

From: Date: Thu, 21 Nov 2002 00:51:07 +0000
Subject: #20527 [NEW]: unixdate
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25367@lists.php.net to get a copy of this message
From: davidegiunchi@libero.it Operating system: Linux 2.4.19 PHP version: 4CVS-2002-11-20 (dev) PHP Bug Type: Apache2 related Bug description: unixdate PHP Fatal error: Cannot redeclare unixdate() in /web/htdocs/home/pnadodb/adodb.inc.php on line 147 Here it's the code that generate the error: -------- /** * Also in ADORecordSet. * @param $v is a date string in YYYY-MM-DD format * * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format */ function UnixDate($v) { if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", ($v), $rr)) return false; if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0; // h-m-s-MM-DD-YY return mktime(0,0,0,$rr[2],$rr[3],$rr[1]); } ---------------- The funcion is called in this way: --- else $d = ADOConnection::UnixDate($d); -------- The same program works find with Apache1.3.27+php-4.2.3 You can try this program at http://php.weblogs.com/ADODB it's named "ADOdb Library for PHP" Regards. -- Edit bug report at http://bugs.php.net/?id=20527&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20527&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20527&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20527&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20527&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20527&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20527&r=support Expected behavior: http://bugs.php.net/fix.php?id=20527&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20527&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20527&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20527&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20527&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20527&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20527&r=isapi

« previous php.bugs (#25367) next »