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

oci8: deprecation warning in selectLimit() on PHP 8.1 #992

Closed
wants to merge 2 commits into from

Conversation

wesyah234
Copy link
Contributor

This is to prevent a PHP 8.2 warning

@dregad dregad self-assigned this Jul 25, 2023
@dregad dregad added bug PHP8.1 PHP8.1 Compatibility Issues labels Jul 25, 2023
@dregad dregad added this to the v5.22.7 milestone Jul 25, 2023
@dregad
Copy link
Member

dregad commented Jul 25, 2023

Thanks for your contribution.

I assume that by null $inputArr you actually mean that the parameter has not been provided and the variable is therefore set to its default value of false (not null), triggering the Automatic conversion of false to array is deprecated warning at line 892, which does not occur when $inputarr === null.

I'm fine with the proposed change, even though it may be cleaner to change the parameter's default value to [] - but I'd rather not change the function's signature in a hotfix release.

Also, this deprecation was introduced in PHP 8.1, not 8.2.

@dregad dregad added the OCI8 (Oracle) Oracle DBMS (Tier 1) label Jul 25, 2023
@dregad dregad changed the title Handle null $inputArr outside the if/else block in the SelectLimit method oci8: deprecation warning in selecLimit() on PHP 8.1 Jul 25, 2023
@dregad dregad closed this in 88584c9 Jul 25, 2023
@wesyah234 wesyah234 changed the title oci8: deprecation warning in selecLimit() on PHP 8.1 oci8: deprecation warning in selectLimit() on PHP 8.1 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OCI8 (Oracle) Oracle DBMS (Tier 1) PHP8.1 PHP8.1 Compatibility Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants