MantisBT: master 8792ee55

Author Committer Branch Timestamp Parent
dregad dregad master 2011-10-24 07:41 master 674fbf70
Affected Issues  0013438: adodb: Fatal error: Call to a member function FetchRow() on a non-object
Changeset

DB ADOdb MetaIndex fails when no constraints exist

Working with Oracle database (oci8), when MetaIndex() method is called
to retrieve the list of indexes for a table that has no constraints
set, an error is triggered:
Fatal error: Call to a member function FetchRow() on a non-object

This commit adds a check to cleanly exit the function, returning false.

Similar error handling has also been added to the calling database_api
function db_index_exists()

This allows the DB installation (schema.php) to proceed without errors.

Fixes 0013438

Porting to 1.3 - Conflicts:
library/adodb/drivers/adodb-oci8.inc.php

Note: the fix to ADOdb driver does not need to be ported as it was
included in a later release of the library.

mod - core/database_api.php Diff File