PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #595

Hyphens (which are valid in MySQL table names) aren't valid in PHP Classes

Details

Submitted2004-01-17 17:56 UTC
Fromthomas at unifiedconsulting dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP VersionIrrelevant
OSLinux 2.6.0
Roadmaps(Not assigned)

Comments

[2004-01-17 17:56 UTC] thomas at unifiedconsulting dot com

Description:
------------
When createTables encounters a table with a name like "foo-bar" it creates a class with a hyphen in its name, which is invalid.

Reproduce code:
---------------
-Create a MySQL table with a hyphen in its name
-Run createTables.php

Expected result:
----------------
Hyphens should be converted to a valid character (e.g. '_') or the script should fail with a message

Actual result:
--------------
Classes like this one are created:
class DataObjects_foo-bar extends DB_DataObject {
...
}

[2004-12-07 10:35 UTC] eingfoan at yahoo dot de

hi all,

with pear data object 1.7.2

i get the hyphen problems again !

any suggestion why?

thx chris