Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4249 closed defect (bug) (fixed)

5446 mucks things up a bit

Reported by: masquerade Owned by: rob1n
Milestone: 2.3 Priority: normal
Severity: blocker Version: 2.2
Component: General Keywords:
Focuses: Cc:


You can't call a function before it is defined, namely status_header(). Will create fatal errors.

Change History (7)

#1 @rob1n
9 years ago

  • Milestone changed from 2.2 to 2.3
  • Status changed from new to assigned

I believe you mean in wpdb::bail()? I'll add a function_exists() call, since the 503 header isn't essential.

#2 @rob1n
9 years ago

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

(In [5455]) Don't call the function if it doesn't exist yet. fixes #4249

#3 @masquerade
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Bail is called only when we can't connect at all. That function will _never_ be defined when that's called. Its dead code, either the function needs to be moved or it should be axed altogether.

#4 @matt
9 years ago


#5 @rob1n
9 years ago

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

(In [5458]) Don't make useless status_header() call. fixes #4249

#6 @matt
9 years ago

What about moving the function further up in the includes, maybe even in wpdb?

#7 @masquerade
9 years ago

We've had issues like this before with functions in wpdb. I'd prefer not to see functions that aren't directly associated with the db in the db file, but perhaps we can move some of these essential functions to an essential.php or somesuch.

Note: See TracTickets for help on using tickets.