php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23271 Error in ifx.php database connect code
Submitted: 2003-04-18 09:30 UTC Modified: 2003-04-18 09:34 UTC
From: jkaufman at wamnet dot com Assigned:
Status: Closed Package: PEAR related
PHP Version: 4CVS-2003-04-18 (stable) OS: Mandrake Linux 9.1
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: jkaufman at wamnet dot com
New email:
PHP Version: OS:

 

 [2003-04-18 09:30 UTC] jkaufman at wamnet dot com
The connect function in DB/ifx.php contains this:

    function connect(&$dsninfo, $persistent = false)
    {
    if (!DB::assertExtension('informix') || !DB::assertExtension('Informix')) {
   return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND);
    }

It should be:

    function connect(&$dsninfo, $persistent = false)
    {
      if (!DB::assertExtension('informix') && !DB::assertExtension('Informix')) {
    return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND);
      }

Note the '||' must be changed to '&&' or it will always fail when it shouldn't, and succeed when it shouldn't.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-18 09:34 UTC] lsmith@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 04:01:30 2024 UTC