Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize ADORecordSet::$fetchMode in parent class #958

Closed
dregad opened this issue Apr 16, 2023 · 0 comments · Fixed by #959
Closed

Initialize ADORecordSet::$fetchMode in parent class #958

dregad opened this issue Apr 16, 2023 · 0 comments · Fixed by #959
Assignees
Milestone

Comments

@dregad
Copy link
Member

dregad commented Apr 16, 2023

There is a lot of duplicated code in the RecordSet class hierarchy, as the logic to initialize the $fetchMode property from $ADODB_FETCH_MODE global is repeated in most drivers. It should be set in the parent class.

It would also make sense to initialize the recently-added $adodbFetchMode property (see #911) at the same time, as it is currently not consistently set except in those drivers that actually use it.

@dregad dregad added this to the v5.23.0 milestone Apr 16, 2023
@dregad dregad self-assigned this Apr 16, 2023
dregad added a commit that referenced this issue Apr 16, 2023
This reduces code duplication as the logic to initialize $fetchMode from
$ADODB_FETCH_MODE global was repeated in most drivers.

$adodbFetchMode is systematically initialized as well now; previously it
was only set in those drivers having specific fetch modes.

Fixes #958
dregad added a commit that referenced this issue May 22, 2023
This reduces code duplication as the logic to initialize $fetchMode from
$ADODB_FETCH_MODE global was repeated in most drivers.

$adodbFetchMode is systematically initialized as well now; previously it
was only set in those drivers having specific fetch modes.

Fixes #958
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant