Update param and return type for db2_autocommit()#2239
Merged
ondrejmirtes merged 2 commits intophpstan:1.10.xfrom Feb 18, 2023
Merged
Update param and return type for db2_autocommit()#2239ondrejmirtes merged 2 commits intophpstan:1.10.xfrom
db2_autocommit()#2239ondrejmirtes merged 2 commits intophpstan:1.10.xfrom
Conversation
Collaborator
|
This pull request has been marked as ready for review. |
eb4b553 to
f051330
Compare
f051330 to
b7b0ccb
Compare
a986c81 to
aec874a
Compare
ondrejmirtes
requested changes
Feb 17, 2023
| 'DateTimeZone::listAbbreviations' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'], | ||
| 'DateTimeZone::listIdentifiers' => ['list<string>', 'what='=>'int', 'country='=>'string'], | ||
| 'db2_autocommit' => ['mixed', 'connection'=>'resource', 'value='=>'int'], | ||
| 'db2_autocommit' => ['DB2_AUTOCOMMIT_OFF|DB2_AUTOCOMMIT_ON|bool', 'connection'=>'resource', 'value='=>'DB2_AUTOCOMMIT_OFF|DB2_AUTOCOMMIT_ON'], |
Member
There was a problem hiding this comment.
What does the function do if it receives something that isn't \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON? Like 1337 for example?
Contributor
Author
There was a problem hiding this comment.
A warning is emitted and the function returns false:
Warning: db2_autocommit(): value must be one of DB2_AUTOCOMMIT_ON or DB2_AUTOCOMMIT_OFF
Member
|
Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to version ibm_db2 2.1, the
db2_autocommit()function was expecting a boolean as argument 2.See:
db2_autocommit()php/doc-en#2300Additionally, the return type of this function can be
DB2_AUTOCOMMIT_OFF|DB2_AUTOCOMMIT_ON|booldepending on the received arguments: