Bug #75265 [NEW]: Returnvalue from strtotime doesn't always return false on errors

From: Date: Wed, 27 Sep 2017 09:00:24 +0000
Subject: Bug #75265 [NEW]: Returnvalue from strtotime doesn't always return false on errors
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211379@lists.php.net to get a copy of this message
From: sven dot kaegi at intellicard dot ch Operating system: Irrelevant PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Returnvalue from strtotime doesn't always return false on errors Description: ------------ --- From manual page: http://www.php.net/function.strtotime --- It seems that if you call strtotime with two parameters like this: strtotime("+1 day","27.09.2017"); The return value is a timestamp pointing to the 2nd of January 1970. As I didn't use as a second paramater a valid timestamp this should - according to the documentation - return false instead of a valid timestamp. Test script: --------------- if(strtotime("+1 day","27.09.2017")!==false) { echo "Illegal return value"; } -- Edit bug report at https://bugs.php.net/bug.php?id=75265&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75265&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75265&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75265&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75265&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75265&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75265&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75265&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75265&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75265&r=support Expected behavior: https://bugs.php.net/fix.php?id=75265&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75265&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75265&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75265&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75265&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75265&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75265&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75265&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75265&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75265&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75265&r=mysqlcfg

« previous php.bugs (#211379) next »