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

Calls to _db_replace() are not consistent resulting in warnings #2722

Closed
ddb4github opened this issue Jun 9, 2019 · 3 comments
Closed

Calls to _db_replace() are not consistent resulting in warnings #2722

ddb4github opened this issue Jun 9, 2019 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@ddb4github
Copy link
Contributor

Describe the bug

  1. function _db_replace has argv $has_autoinc, but never use it
  2. function sql_save call _db_replace with a valid param $has_autoinc, default is 'true
  3. function db_replace call db_replace without the 5th argv $has_autoinc
@TheWitness
Copy link
Member

Jing, is this critical?

@ddb4github
Copy link
Contributor Author

Jing, is this critical?

Just a quick code validating.

Might impact function sql_save, need more testing from Monday

@netniV
Copy link
Member

netniV commented Jun 9, 2019

The validation is correct. The has_autoinc parameter is never used but was introduced as part of 47de436 which was a backport apparently.

We should correct the function definition and/or make sure the calls are aligned.

@netniV netniV added the bug Undesired behaviour label Jun 9, 2019
@netniV netniV added this to the v1.2.5 milestone Jun 9, 2019
@netniV netniV changed the title lib/database.php:1272: Expected 5 arguments. Found 4. Calls to _db_replace() are not consistent resulting in warnings Jun 9, 2019
@netniV netniV closed this as completed in 1f626f3 Jun 9, 2019
@netniV netniV added the resolved A fixed issue label Jun 9, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants