Skip to content

Fix GH-24641: ndbm handler does not check dbm_open() result - #24650

Closed
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24641-ndbm-open-check
Closed

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24641-ndbm-open-check

Conversation

@lazerg

@lazerg lazerg commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

dbm_open() returns NULL when it can't open the database, but the ndbm open handler stored that NULL and reported success, so the first dba_firstkey()/dba_fetch() on the handle crashed. It now returns FAILURE like the other handlers, and dba_open() gives the usual "Driver initialization failed" warning.

Fixes #24641

@Girgias

Girgias commented Oct 24, 2026

Copy link
Copy Markdown
Member

I'm closing this in favour of #24652

@Girgias Girgias closed this Oct 24, 2026
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.

2 participants