WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#11721 closed defect (bug) (fixed)

Undefined index: class in C:\Vn\wptest\wp-includes\wp-db.php at line 1112

Reported by: arena Owned by: westi
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.1
Component: Warnings/Notices Keywords: has-patch tested commit
Focuses: Cc:

Description

avoid this message :

Undefined index: class in C:\Vn\wptest\wp-includes\wp-db.php at line 1112

Attachments (1)

#11721.patch (470 bytes) - added by arena 5 years ago.

Download all attachments as: .zip

Change History (10)

@arena5 years ago

comment:1 @arena5 years ago

  • Keywords has-patch added

comment:2 @arena5 years ago

  • Keywords tested added

comment:3 @arena5 years ago

  • Milestone changed from 3.0 to 2.9.2

comment:4 @dd325 years ago

  • Component changed from Database to Warnings/Notices
  • Milestone changed from 2.9.2 to 3.0
  • Owner changed from ryan to westi

PHP Warnings are not "serious" enough for maintainence releases, They do not prevent any functionality, and should not be enabled on a production website.

comment:5 @arena5 years ago

  • Keywords dev-feedback added
  • Milestone changed from 3.0 to 2.9.2

This part of the code is run a bunch of time (in fact each time a mysql query is executed).
So each time it is executed, PHP detects the error and runs the logging process (even to detect this error should not be punched).

I change milestone to 2.9.2 + dev-feedback for two reasons :

  • patch is very simple.
  • patch has a global impact on wp performances.

comment:6 @hakre5 years ago

Jup, it's important to keep in mind that the @-operator is a hard hit on performance. Avoid if possible.

There are plenty of queries executed ... .

comment:7 @miqrogroove5 years ago

  • Milestone changed from 2.9.2 to 3.0

-1 The message in OP should never be displayed because it is suppressed by the error control operator. There is no bug here. I agree with dd32 it is not relevant to the 2.9 branch unless there is a reproducible bug.

comment:8 @miqrogroove5 years ago

  • Keywords commit added; dev-feedback removed

+1 Now would be a good time to commit and close.

comment:9 @nacin5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13174]) Fix suppressed notice in wpdb::get_caller(). Props arena, fixes #11721

Note: See TracTickets for help on using tickets.