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: BaseConnection::escape() does not accept Stringable #8756

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 10, 2024

Description
Supersedes #8739

  • BaseConnection::escape() accepts Stringable
  • BaseConnection::escapeString() accepts Stringable
  • Time implements Stringable
TypeError: CodeIgniter\Database\SQLite3\Connection::_escapeString(): Argument #1 ($str) must be of type string, CodeIgniter\I18n\Time given

See also codeigniter4/shield#1092

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

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer labels Apr 10, 2024
@kenjis kenjis force-pushed the fix-BaseConnection-escape-TypeError branch from f015dbe to 4ac163d Compare April 10, 2024 23:26
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Compatible with the Shield.
Thanks.

@kenjis kenjis merged commit 59ec72d into codeigniter4:develop Apr 11, 2024
40 checks passed
@kenjis kenjis deleted the fix-BaseConnection-escape-TypeError branch April 11, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants