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

DB_DataObject.php fails with exception during generation

Details

Submitted2005-03-10 13:30 UTC
Fromtherion_5 at hotmail dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.3.10
OSWindows 2k
Roadmaps(Not assigned)

Comments

[2005-03-10 13:30 UTC] therion_5 at hotmail dot com

Description:
------------
createTables.php should somehow define DB_DATAOBJECT_NO_OVERLOAD, if we don't want to define it in DB_DataObject.php.

for example:

if(version_compare('5.0.0', phpversion(),'>'))
define('DB_DATAOBJECT_NO_OVERLOAD',1);

will define this if version of php is greater than 5.0.0.

or we can put following code in DB_DataObject.php

if(version_compare('5.0.0', phpversion(),'>') &&
(!defined('DB_DATAOBJECT_NO_OVERLOAD') ||
constant('DB_DATAOBJECT_NO_OVERLOAD')!=1))
define('DB_DATAOBJECT_NO_OVERLOAD',1);

in this case clients can forget about DB_DATAOBJECT_NO_OVERLOAD

Actual result:
--------------
$>php createTables.php dbconfig.ini
PHP Fatal error: overload does not work with PHP4.3.10, either upgrade
(snaps.php.net) or more recent version
or define DB_DATAOBJECT_NO_OVERLOAD as per the manual.
in apache\php-4.3.10\pear\DB\DataObject.php on line 195