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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shmengie_2000 at yahoo dot com
New email:
PHP Version: OS:

 

Patches

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 02:01:35 2024 UTC