php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10544 if(!($res=OCIPLogon(...))
Submitted: 2001-04-28 22:03 UTC Modified: 2001-04-29 06:01 UTC
From: shmengie_2000 at yahoo dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (28/04/2001) OS: linux and nt
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shmengie_2000 at yahoo dot com
New email:
PHP Version: OS:

 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-28 22:05 UTC] shmengie_2000 at yahoo dot com
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"))) 
 [2001-04-29 06:01 UTC] andi@php.net
Should be fixed in latest CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 03:01:27 2025 UTC