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

DB\DataObject\Generator.php doesn't generate a proper footer

Details

Submitted2005-03-06 02:32 UTC
Fromns_fsu at hotmail dot com
StatusBogus
PackageDB_DataObject
PHP Version5.0.2
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-03-06 02:32 UTC] ns_fsu at hotmail dot com

Description:
------------
The Generate.php file which generates skeleton PHP files for use with DB_DataObject doesn't insert the "?>" found at the end of all PHP files.

__________________________________________

DB_DataObject 1.7.6 stable:

Generator.php:

Line 643: $foot .= "}\n";
__________________________________________

Should be something like:
$foot .= "}\n\n?>";

Reproduce code:
---------------
Refer to the PEAR manual docs on DB_DataObject. Follow the procedure in "Auto Building and Database Schema -- creating the base Classes and Database schema."

Expected result:
----------------
<?php
/**
* Table Definition for YourTable
*/
require_once 'DB/DataObject.php';

class dataobjects_YourTable extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */

/* BLAH BLAH BLAH */

/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('dataobjects_YourTable',$k,$v); }

/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}

/****************************************************
* NOTE THE ENDING CLOSING TAG BELOW:
*****************************************************/
?>

Actual result:
--------------
<?php
/**
* Table Definition for YourTable
*/
require_once 'DB/DataObject.php';

class dataobjects_YourTable extends DB_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */

/* BLAH BLAH BLAH */

/* Static get */
function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('dataobjects_YourTable',$k,$v); }

/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
}

/****************************************************
* NO ENDING PHP CLOSING TAG ("?>")
*****************************************************/

[2005-03-06 02:38 UTC] ns_fsu at hotmail dot com

Change of my e-mail address on submission...