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

firebird 1.51 table names are padded to fixed length with trailing blanks

Details

Submitted2005-05-11 06:14 UTC
Fromale dot pas at tiscali dot it
StatusBogus
PackageDB_DataObject
PHP Version5.0.4
OSlinux
Roadmaps(Not assigned)

Comments

[2005-05-11 06:14 UTC] ale dot pas at tiscali dot it

Description:
------------
Tested with firebird 1.51 tables.
The script createTables.php pad table names to a fixed length with trailing blanks, this means that those names don't match anymore with table definitions and the var declarations are completely missing from the resulting classes.

Reproduce code:
---------------
The following patch solved the problem (I did'n check if this breaks anything in other DB's):

* @version CVS: $Id: Generator.php,v 1.91 2005/03/23 02:35:35 alan_k Exp $

Line: 181
// Insert the following line:
$table = trim($table);
// we find a matching table, just store it into a temporary array
$tmp_table[] = $table;

Expected result:
----------------
Var definitions (and optionally getter and setter methods) created.

Actual result:
--------------
Var definitions (and optionally getter and setter methods) are not created.

[2005-05-18 00:23 UTC] smith at backendmedia dot com

Only briefly skimmed the bug report, but there is DB_PORTABILITY_RTRIM.

http://pear.php.net/manual/en/package.database.db.intro-portability.php

[2005-05-18 06:56 UTC] ale dot pas at tiscali dot it

It works with the option DB_PORTABILITY_RTRIM set.

Code:
$dboptions = &PEAR::getStaticProperty('DB','options');
$dboptions = $config['DB'];

Ini file:
[DB]
portability = 2