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_DataObject » Bug #9628

bug fix

Details

Submitted2006-12-15 11:38 UTC
Fromrecca at seed dot net dot tw
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.4.4
Roadmaps(Not assigned)

Comments

[2006-12-15 11:38 UTC] recca at seed dot net dot tw

Description:
------------
line 1366 of Generator.php

current
$res = $__DB->queryAll('DESCRIBE ' . $table,DB_FETCHMODE_ASSOC);

fixed
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$query_method = ( empty($options['db_driver']) ? 'getAll' : 'queryAll');

[2006-12-15 11:41 UTC] recca at seed dot net dot tw

line 1366 of Generator.php

current
$res = $__DB->queryAll('DESCRIBE ' . $table,DB_FETCHMODE_ASSOC);

fixed
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$query_method = ( empty($options['db_driver']) ? 'getAll' :
'queryAll');
$res = $__DB->$query_method('DESCRIBE ' . $table,DB_FETCHMODE_ASSOC);

[2006-12-15 12:02 UTC] recca at seed dot net dot tw

fixed
$query_method = ($options['db_driver'] == 'DB')?'getAll':'queryAll');