PHP 4.0 Bug #10544 Updated: if(!($res=OCIPLogon(...))
| From: | shmengie_2000 at yahoo dot com | Date: | Sun, 29 Apr 2001 02:05:39 +0000 |
| Subject: | PHP 4.0 Bug #10544 Updated: if(!($res=OCIPLogon(...)) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52816@lists.php.net to get a copy of this message | ||
ID: 10544
User Update by: shmengie_2000@yahoo.com
Status: Open
Bug Type: Scripting Engine problem
Description: if(!($res=OCIPLogon(...))
Serious problem...
I checked out php4 today, and compiled it on windows and linux.
The bang (!) in the if statement changes the resource to
if(!($connection=ociplogon("scott","tiger","orcl"))) {
var_dump($connection) = resource(1) of type (Unknown)
w/out the bang(!)
if(($connection=ociplogon("scott","tiger","orcl"))) {
var_dump($connection) = resource(1) of type (oci8 connection)
This code fails miserably:
<?
$connection=0;
$statement=0;
if(!($connection=ociplogon("scott","tiger","orcl"))) { echo
"above result is false, so this will probably never happen<br>\n";
}
var_dump($connection);
$query = "select user from dual";
$statement=OCIParse($connection,$query);
OCIExecute($statement);
OCIFetch($statement);
echo OCIResult($statement,1)."<br>\n";
OCIFreeStatement($statement);
?>
if(!($connection=ociplogon("scott","tiger","orcl")))
Previous Comments:
---------------------------------------------------------------------------
[2001-04-28 22:03:39] shmengie_2000@yahoo.com
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=10544