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 #5855

Missing parameter for OCILOGON()/OCIPLOGON() in oci8.php

Details

Submitted2005-11-03 11:21 UTC
Fromroehr at zilleon dot com
StatusWont fix
PackageDB
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-11-03 11:21 UTC] roehr at zilleon dot com

Description:
------------
Because OCILOGON() and OCIPLOGON() are aliases for oci_connect() and oci_pconnect() they should respect the character set parameter as well.

Please find below a patch that adds the missing parameter in the function call.

Thanks and best regards,
Torsten Roehr

Test script:
---------------
Index: oci8.php
===================================================================
@@ -216,6 +216,8 @@
$this->dbsyntax = $dsn['dbsyntax'];
}

+ $char = empty($dsn['charset']) ? null : $dsn['charset'];
+
if (function_exists('oci_connect')) {
if (isset($dsn['new_link'])
&& ($dsn['new_link'] == 'true' || $dsn['new_link'] === true))
@@ -233,7 +235,6 @@
$db = $dsn['database'];
}

- $char = empty($dsn['charset']) ? null : $dsn['charset'];
$this->connection = @$connect_function($dsn['username'],
$dsn['password'],
$db,
@@ -251,10 +252,13 @@
if ($dsn['hostspec']) {
$this->connection = @$connect_function($dsn['username'],
$dsn['password'],
- $dsn['hostspec']);
+ $dsn['hostspec'],
+ $char);
} elseif ($dsn['username'] || $dsn['password']) {
$this->connection = @$connect_function($dsn['username'],
- $dsn['password']);
+ $dsn['password'],
+ null,
+ $char);
}
}