You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a BYTEA column, it is a PHP 'resource' type which can be read like a file.
When saving such a column, an escaped value (such as '\x9f319004ad45' can be set in the case of PostgreSQL) and it will be translated to a resource for PDO to write. When it goes to write it however, it gets cast to a string somewhere along the line and ends up writing data like 'Resource #68' to the bytea column instead of the intended binary data.
The following is a patch to CDbConnection.php (diff on tag 1.1.11) which corrects the problem:
When reading a BYTEA column, it is a PHP 'resource' type which can be read like a file.
When saving such a column, an escaped value (such as '\x9f319004ad45' can be set in the case of PostgreSQL) and it will be translated to a resource for PDO to write. When it goes to write it however, it gets cast to a string somewhere along the line and ends up writing data like 'Resource #68' to the bytea column instead of the intended binary data.
The following is a patch to CDbConnection.php (diff on tag 1.1.11) which corrects the problem:
The text was updated successfully, but these errors were encountered: