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

Generator creates PHP syntax breaking code

Details

Submitted2007-01-15 12:26 UTC
Frompowtac at gmx dot de
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version5.2.0
OSWIN 2000
Roadmaps(Not assigned)

Comments

[2007-01-15 12:26 UTC] powtac at gmx dot de

Description:
------------
I'm using a MSSql server witch has colum names like "E-Mail" oder "EG Number".

The Generator creates my DataObject-files with contents like this:

...
public $Telefax; // varchar(25)
public $E-Mail; // varchar(60)
public $Internet; // varchar(60)
public $EG Number; // varchar(30)
...

This breaks the PHP syntax of variable names. Because it uses "-" and" "!

The regular expression for a variable name is:
^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$