diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2025-01-31 23:36:01 +0100 |
---|---|---|
committer | Tim Starling <tstarling@wikimedia.org> | 2025-02-13 14:26:25 +1100 |
commit | 815489fe222ffa92fa36a6dfd9ce50b5b858651f (patch) | |
tree | 37aaf4e5c3601221e8361b99ec4dcf0be987be66 /includes/api/ApiPageSet.php | |
parent | 3258c2ef99d96cbab7a86c6e674edb257b6e9296 (diff) | |
download | mediawikicore-815489fe222ffa92fa36a6dfd9ce50b5b858651f.tar.gz mediawikicore-815489fe222ffa92fa36a6dfd9ce50b5b858651f.zip |
Replace call_user_func with dynamic function call
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
Diffstat (limited to 'includes/api/ApiPageSet.php')
-rw-r--r-- | includes/api/ApiPageSet.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 824f2c0c6c81..47db90330f3d 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1601,8 +1601,7 @@ class ApiPageSet extends ApiBase { ) { // It is necessary to set both $data and add to $result, if an ApiResult, // to ensure multiple redirects to the same destination are all merged. - $data[$toPageId] = call_user_func( - $this->mRedirectMergePolicy, + $data[$toPageId] = ( $this->mRedirectMergePolicy )( $data[$toPageId], $this->mGeneratorData[$fromNs][$fromDBkey] ); |