Home » Database » DB_DataObject » Bug #595
Hyphens (which are valid in MySQL table names) aren't valid in PHP Classes
Details
| Submitted | 2004-01-17 17:56 UTC |
|---|---|
| From | thomas at unifiedconsulting dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| OS | Linux 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