Merge "Do not suppress php notices in SpecialPageFatalTest"
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index e3bd542..e3df499 100644 (file)
@@ -374,7 +374,7 @@ class ExtensionRegistry {
                                }
                                throw new UnexpectedValueException( "callback '$cb' is not callable" );
                        }
-                       call_user_func( $cb, $info['credits'][$name] );
+                       $cb( $info['credits'][$name] );
                }
        }
 
@@ -433,9 +433,11 @@ class ExtensionRegistry {
         * @since 1.33
         */
        public function setAttributeForTest( $name, array $value ) {
+               // @codeCoverageIgnoreStart
                if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
                        throw new RuntimeException( __METHOD__ . ' can only be used in tests' );
                }
+               // @codeCoverageIgnoreEnd
                if ( isset( $this->testAttributes[$name] ) ) {
                        throw new Exception( "The attribute '$name' has already been overridden" );
                }