PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #3823

No check for PHP <4.2.0 for $dsn['new_link']

Details

Submitted2005-03-15 09:17 UTC
Frompear-bug at jonathanhunt dot org
StatusBogus
PackageDB
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2005-03-15 09:17 UTC] pear-bug at jonathanhunt dot org

Description:
------------
Using DB 1.7.1 and DB 1.7.4
The extra dsn param 'new_link' is only valid for PHP >=4.2.0
But no check is made in mysql.php (as there is for 'client_flags' so on PHP 4.1.0 ( :-( my host is out of date) it causes a 'Wrong parameter count for mysql_connect' error.

Reproduce code:
---------------
Commenting out the lines:

if (isset($dsn['new_link'])
&& ($dsn['new_link'] == 'true' || $dsn['new_link'] === true))
{
$params[] = true;
} else {
$params[] = false;
}

fixes the error, but it would be better to test for PHP version...

[2005-03-15 09:57 UTC] smith at backendmedia dot com

Thank you for taking the time to write to us, but this is not
a bug.

Dependencies:

* PHP Version: PHP 4.2.0 or newer

see http://pear.php.net/package/DB/download