-
Notifications
You must be signed in to change notification settings - Fork 81
Fix https://github.com/stuttter/ludicrousdb/issues/188 #194
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
base: master
Are you sure you want to change the base?
Fix https://github.com/stuttter/ludicrousdb/issues/188 #194
Conversation
|
Matching the behavior of |
|
I won't have time in the next 2 weeks, will complete it then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses issue #188 by updating the db_connect() method signature to include an $allow_bail parameter for WordPress compatibility. The changes ensure better alignment with WordPress core's wpdb class while maintaining backward compatibility with existing code.
Key Changes:
- Added
$allow_bailparameter todb_connect()method with backward compatibility handling for legacy single-parameter calls - Updated all call sites of
db_connect()to pass the appropriate$allow_bailvalue - Refactored
select()method to split the ambiguous$dbh_or_tableparameter into separate$dbhand$tableparameters with backward compatibility support - Renamed parameters for clarity:
$to_escape→$datain_real_escape(), and$die_on_disconnect→$allow_bailincheck_connection()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Fix #188
Please let me know whether we want to use $allow_bail there and if not set should ovewrite with die_on_disconnect or use the WP default true (like in
check_connection()