Add an additional check to the Debug Bar integration to avoid triggering a fatal error in the unusual situation where `Debug_Bar` exists and `Debug_Bar_Panel` does not.
This should never happen with the Debug Bar plugin itself. However, it's apparently possible if Query Monitor is involved. See #543
This commit is contained in:
parent
0f7296123e
commit
00774ef3d9
|
|
@ -980,7 +980,11 @@ if ( !class_exists(UpdateChecker::class, false) ):
|
|||
* Initialize the update checker Debug Bar plugin/add-on thingy.
|
||||
*/
|
||||
public function maybeInitDebugBar() {
|
||||
if ( class_exists('Debug_Bar', false) && file_exists(dirname(__FILE__) . '/DebugBar') ) {
|
||||
if (
|
||||
class_exists('Debug_Bar', false)
|
||||
&& class_exists('Debug_Bar_Panel', false)
|
||||
&& file_exists(dirname(__FILE__) . '/DebugBar')
|
||||
) {
|
||||
$this->debugBarExtension = $this->createDebugBarExtension();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue