Codeception / module-db

DB module for Codeception
MIT License
23 stars 24 forks source link

Issue having null values in database because of string type #65

Closed guraurobi closed 10 months ago

guraurobi commented 10 months ago

https://github.com/Codeception/module-db/blob/185889230bccfc65d2c03624879ade5357ec43f9/src/Codeception/Lib/Driver/Db.php#L348

This new addition broke all usages of haveInDatabase of null data for a certain column.

Example of fail: $I->haveInDatabase('table_name', ['column_name' => null]);

Results in:

[TypeError] Codeception\Lib\Driver\Db::isBinary(): Argument #1 ($string) must be of type string, null given, called in /app/vendor/codeception/module-db/src/Codeception/Lib/Driver/Db.php on line 297

troy-rudolph commented 10 months ago

Please merge https://github.com/Codeception/module-db/pull/63. The fix is there.

guraurobi commented 10 months ago

Hey @troy-rudolph! Thanks so much for this fast fix, but please check my comments, might be useful!