dg / dibi

Dibi - smart database abstraction layer
https://dibiphp.com
Other
487 stars 136 forks source link

ResultDriver::unescapeBinary() has too restrictive typehint #283

Closed jiripudil closed 6 years ago

jiripudil commented 6 years ago

Description

The typehint in Dibi\ResultDriver::unescapeBinary(string $value) seems too narrow. PDO wraps retrieved binary data in a resource and therefore we get:

Type error: Argument 1 passed to Dibi\Drivers\PdoDriver::unescapeBinary() must be of the type string, resource given, called in vendor/dibi/dibi/src/Dibi/Result.php on line 504 in vendor/dibi/dibi/src/Dibi/Drivers/PdoDriver.php:365
dg commented 6 years ago

Thanks for report