PHP 4.0 Bug #7698 Updated: False and FALSE constants not reliable

From: Date: Thu, 16 Nov 2000 10:32:43 +0000
Subject: PHP 4.0 Bug #7698 Updated: False and FALSE constants not reliable
Groups: php.dev 
Request: Send a blank email to php-dev+get-38323@lists.php.net to get a copy of this message
ID: 7698 Updated by: stas Reported By: steve@szabos.com Status: Closed Bug Type: *General Issues Assigned To: Comments: Try using !== instead of !=. != is numeric compare. Previous Comments: --------------------------------------------------------------------------- [2000-11-08 14:33:42] steve@szabos.com When is the FALSE constant not False? $nResult = odbc_autocommit ($odbcConnection, FALSE) if ( $nResult != FALSE ) echo "ERROR: Unable to turn off commits!"; The above code worked most of the time, but sporatically reported an "ERROR:..." condition. I tried changing "FALSE" to "False", but saw the same behavior. I am using the ISAPI DLL. Perhaps there is a re-entrancy problem? It works fine for a while after I restart IIS. For now, I switched my code to use 0 (zero) and 1 (one) everywhere, instead of FALSE and TRUE. This seems to have fixed the problem. Steve --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7698

« previous php.dev (#38323) next »