Page MenuHomePhorge

No OneTemporary

Size
878 B
Referenced Files
None
Subscribers
None
diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php
index 0efd8b496e2..2b4a1300038 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -728,7 +728,10 @@ TXT;
// initialization, e.g. if an autoloaded file triggers deprecation warnings.
// To avoid a difficult-to-debug autoload loop, avoid attempting to initialize the service
// container here. (T380456).
- if ( !MediaWikiServices::hasInstance() ) {
+ // The exception handler is also triggered when autoloading of HookRunner class fails,
+ // > Uncaught Error: Class "MediaWiki\HookContainer\HookRunner" not found
+ // Avoid use of the not-loaded class here, as that override the real error.
+ if ( !MediaWikiServices::hasInstance() || !class_exists( HookRunner::class, false ) ) {
return;
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:33 AM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227859
Default Alt Text
(878 B)

Event Timeline