zendframework/zend-db

TableGateway used with TableIdentifier and MetadataFeature

Closed this issue · 2 comments

Provide a narrative description of what you are trying to accomplish.

Code to reproduce the issue

When using TableGateway with TableIdentifier and MetadataFeature, I have an error message (see below).
My database is PostgreSQL 10.8.

$test = new TableGateway(new TableIdentifier('test', 'public'), $adapter, new MetadataFeature());

Expected results

I'm expecting the same result that I get with the following code (that one works):

$test = new TableGateway('test', $adapter, new MetadataFeature());

Actual results

Error message:

ErrorException: Illegal offset type in isset or empty in file vendor/zendframework/zend-db/src/Metadata/Source/AbstractSource.php on line 449

See https://github.com/zendframework/zend-db/blob/master/src/Metadata/Source/AbstractSource.php#L449

Seems to have been already mentioned in 2013 (zendframework/zendframework#4287) but was never closed.

I think I found the way to fix this ; see PR #392