From: remco at mailstreet dot nl Operating system: Apache/2.0.63 (Unix) mod_ssl/2.0 PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: function empty() on datetime doesn't work correctly
Description: ------------ if i toggle something like this it doesn't give me the result i would suspect to get: $dateTime is a mysql datetime string like :'0000-00-00 00:00:00' Wich should be equal to empty and not null Reproduce code: --------------- $dateTime = '0000-00-00 00:00:00'; if(empty($dateTime)){ $dateSet = false; } else { $dateSet = true; } var_export($dateSet); Expected result: ---------------- // $dateSet = tue; wich i believe should be false false Actual result: -------------- // $dateSet = tue; wich i believe should be false true -- Edit bug report at http://bugs.php.net/?id=46312&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46312&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46312&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46312&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46312&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46312&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46312&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46312&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46312&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46312&r=support Expected behavior: http://bugs.php.net/fix.php?id=46312&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46312&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46312&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46312&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46312&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46312&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46312&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46312&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46312&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46312&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46312&r=mysqlcfg