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

not reading configuration in insert() function

Details

Submitted2004-02-21 15:33 UTC
Fromdragun at yegon dot sk
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version4.3.2
OSDebian Linux
Roadmaps(Not assigned)

Comments

[2004-02-21 15:33 UTC] dragun at yegon dot sk

Description:
------------
when trying to insert data into a table the configuration is not loaded, that means that some directives like quote_entities in the do.ini file are ignored

the code

function insert()
{
global $_DB_DATAOBJECT;

$quoteEntities = @$_DB_DATAOBJECT['CONFIG']['quote_entities'];

should read in my opinion like this
function insert()
{
global $_DB_DATAOBJECT;
if (empty($_DB_DATAOBJECT['CONFIG'])) {
DB_DataObject::_loadConfig();
}

$quoteEntities = @$_DB_DATAOBJECT['CONFIG']['quote_entities'];

otherwise the quote_entities directive is totaly ignored