X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=includes%2FGlobalFunctions.php;h=a74060c7154e2bf19dd055643b3209a12b088ae7;hb=904049846c5b24d9d0cba907a61768bd27d2f226;hp=a5f4def18f36d1df81a7a3cb671f5fb388f492d7;hpb=46130ec4e344ee33d8e6db4f1be8178eb85e3fe1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a5f4def18f..a74060c715 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -148,6 +148,7 @@ function wfArrayDiff2_cmp( $a, $b ) { * @return array */ function wfArrayFilter( array $arr, callable $callback ) { + wfDeprecated( __FUNCTION__, '1.32' ); return array_filter( $arr, $callback, ARRAY_FILTER_USE_BOTH ); } @@ -160,6 +161,7 @@ function wfArrayFilter( array $arr, callable $callback ) { * @return array */ function wfArrayFilterByKey( array $arr, callable $callback ) { + wfDeprecated( __FUNCTION__, '1.32' ); return array_filter( $arr, $callback, ARRAY_FILTER_USE_KEY ); } @@ -1063,15 +1065,14 @@ function wfLogDBError( $text, array $context = [] ) { /** * Throws a warning that $function is deprecated * - * @param string $function + * @param string $function Function that is deprecated. * @param string|bool $version Version of MediaWiki that the function * was deprecated in (Added in 1.19). - * @param string|bool $component Added in 1.19. + * @param string|bool $component Component to which the function belongs. + * If false, it is assumed the function is in MediaWiki core (Added in 1.19). * @param int $callerOffset How far up the call stack is the original * caller. 2 = function that called the function that called - * wfDeprecated (Added in 1.20) - * - * @return null + * wfDeprecated (Added in 1.20). */ function wfDeprecated( $function, $version = false, $component = false, $callerOffset = 2 ) { MWDebug::deprecated( $function, $version, $component, $callerOffset + 1 );