Edit report at http://bugs.php.net/bug.php?id=46312&edit=1

 ID:                 46312
 Updated by:         [email protected]
 Reported by:        remco at mailstreet dot nl
 Summary:            function empty() on datetime doesn't work correctly
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Apache/2.0.63 (Unix) mod_ssl/2.0
 PHP Version:        5.2.6
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------
[2008-10-16 10:05:34] remco at mailstreet dot nl

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 this bug report at http://bugs.php.net/bug.php?id=46312&edit=1

Reply via email to