Demon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/61925


Change subject: Revert type hinting in Hooks::run()
......................................................................

Revert type hinting in Hooks::run()

Iafdd4cee introduced type hinting to Hooks::run(). Unfortunately,
not all callers pass an array (some pass an object).

This was noticable by breaking importDump.php with a catchable
fatal error.

Change-Id: I6b10c780e3cf76a4f1758cf7e59b3ddcd16ad62e
---
M includes/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/61925/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index ed8b3ed..babdc60 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -129,7 +129,7 @@
         * @throws MWException
         * @throws FatalError
         */
-       public static function run( $event, array $args = array() ) {
+       public static function run( $event, $args = array() ) {
                wfProfileIn( 'hook: ' . $event );
                foreach ( self::getHandlers( $event ) as $hook ) {
                        // Turn non-array values into an array. (Can't use 
casting because of objects.)

-- 
To view, visit https://gerrit.wikimedia.org/r/61925
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b10c780e3cf76a4f1758cf7e59b3ddcd16ad62e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to