Skip to content

Error Handling: Need improvements to database error handling #35

@jburns131

Description

@jburns131

The error handling could be improved when a database exists but does not contain tables.

For MySQL:

If there is already a database but no tables then $rbac->reset(true) returns true, even though no tables are created and no data is inserted.

I think there should either be a check to make sure that reset() actually inserted data into the database or a check to make sure that the tables have been created prior to executing reset(). This does sound like it could be resource intensive if we're checking for an existing database and existing tables inside 'setup.php'.

For MySQLi:

Same issue, but php sends warnings and errors on its own.

For SQLite:

Still need to test with an empty database.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions