Optional parameter is provided before required in performance_test.php

Created on 4 November 2022, about 2 years ago
Updated 16 September 2024, 2 months ago

Problem/Motivation

All method arguments with default values should be declared after the method arguments without default values. Otherwise, it makes it impossible for callers to take advantage of defaults; they must re-specify the defaulted values in order to "get to" the non-default arguments. The only call I found is on line 131 in file performance_test.php and does not need to be changed.

File: simple_sitemap/tests/scripts/performance_test.php

125: public static function doBatchGenerate($count_queries = FALSE, &$context) {

Proposed resolution

125: public static function doBatchGenerate(&$context, $count_queries = FALSE) {
🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇩🇪Germany fnalb2

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024