Skip to content

Fix GH-23758: PDO_Firebird returns null for empty BLOBs - #23763

Open
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-23758-empty-blob
Open

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-23758-empty-blob

Conversation

@lazerg

@lazerg lazerg commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

php_firebird_fetch_blob() only assigns the fetched string when the BLOB has a non-zero length, so a stored empty BLOB left the result zval at the NULL that PDO initialises it to. Callers could not tell an empty BLOB apart from SQL NULL, even though Firebird stores them distinctly.

An empty BLOB now yields an empty string. SQL NULL still returns null, since that case is handled earlier in pdo_firebird_stmt_get_col().

Fixes #23758

@lazerg
lazerg force-pushed the fix/gh-23758-empty-blob branch from 14e9334 to d22da5e Compare September 18, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant