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

Fix compatibility of Postgres result for PHP 8.1 #5278

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

paulbalandan
Copy link
Member

@paulbalandan paulbalandan commented Nov 2, 2021

Description
As of PHP 8.1, the result resource in Postgres is now a PgSql\Result object, so calling is_resource will naturally fail now. The 8.1 migration guide suggests using a check against false.
https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.resource2object

Related: #4883

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan merged commit 4995720 into codeigniter4:develop Nov 3, 2021
@paulbalandan paulbalandan deleted the pgsql-result branch November 3, 2021 01:19
@paulbalandan paulbalandan mentioned this pull request Nov 3, 2021
15 tasks
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