Skip to content

Fix #106: preserve nullable bit when setting SQL_TEXT in _php_ibase_b…#110

Open
MartinKoeditz wants to merge 1 commit intomasterfrom
fix/issue-106-nullable-bit-sql-text
Open

Fix #106: preserve nullable bit when setting SQL_TEXT in _php_ibase_b…#110
MartinKoeditz wants to merge 1 commit intomasterfrom
fix/issue-106-nullable-bit-sql-text

Conversation

@MartinKoeditz
Copy link
Copy Markdown
Collaborator

…ind()

The fallthrough path in _php_ibase_bind() unconditionally set sqltype to SQL_TEXT, discarding the nullable bit (bit 0). This caused subsequent ibase_execute() calls with NULL to be ignored for nullable columns that went through this path.

Fix: use SQL_TEXT | (var->sqltype & 1) to preserve the nullable flag.

Adds test: tests/issue106_001.phpt

…ind()

The fallthrough path in _php_ibase_bind() unconditionally set sqltype to
SQL_TEXT, discarding the nullable bit (bit 0). This caused subsequent
ibase_execute() calls with NULL to be ignored for nullable columns that
went through this path.

Fix: use SQL_TEXT | (var->sqltype & 1) to preserve the nullable flag.

Adds test: tests/issue106_001.phpt
@MartinKoeditz MartinKoeditz requested a review from mlazdans April 15, 2026 15:00
@mlazdans
Copy link
Copy Markdown
Collaborator

Hi! Thanks! Most of issues tagged assigned to me has been already fixed. I have to sit down and commit them here yet :) I will check your code too.

@mlazdans
Copy link
Copy Markdown
Collaborator

Test case will be useful 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants