Opened 9 years ago
Closed 9 years ago
#36403 closed defect (bug) (fixed)
Incorrect use of E_USER_NOTICE in wpdb::_real_escape()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Database | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
in wpdb::_real_escape(), the last parameter for _doing_it_wrong()
calls is E_USER_NOTICE
, which leads to the following message:
wpdb must set a database connection for use with escaping. This message was added in version 1024.
It was apparently influenced by trigger_error(). For _doing_it_wrong(), however, the last parameter should be the version of WordPress where the message was added, i.e. '3.6'
.
Introduced in [24758].
Attachments (2)
Change History (8)
#2
@
9 years ago
- Keywords needs-refresh added
Thanks for the patch, @andizer! It shouldn't be $wp_version
, we need to pass the WordPress version where this error message was introduced - in this case, version 3.6.
#3
@
9 years ago
Thank you for your comment. I was too quick in writing the patch, should have read the issue better. I've updated the patch.
Just added a patch for this.