Skip to content

db2_last_insert_id may return NULL#1214

Merged
ondrejmirtes merged 1 commit into
phpstan:1.6.xfrom
morozov:db2-last-insert-id-null
Apr 14, 2022
Merged

db2_last_insert_id may return NULL#1214
ondrejmirtes merged 1 commit into
phpstan:1.6.xfrom
morozov:db2-last-insert-id-null

Conversation

@morozov

@morozov morozov commented Apr 14, 2022

Copy link
Copy Markdown
Contributor

See JetBrains/phpstorm-stubs#1158 and the source code:

/* Returning last insert ID (if any), or otherwise NULL */
if (last_id[0] != '\0') {
    ZEND_RETURN_STRING(last_id, 0);
} else {
    RETURN_NULL();
}

@ondrejmirtes ondrejmirtes merged commit 8ce006a into phpstan:1.6.x Apr 14, 2022
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

@morozov morozov deleted the db2-last-insert-id-null branch April 14, 2022 20:55
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