Deprecated uasort structure

Created on 21 February 2023, over 1 year ago
Updated 2 February 2024, 5 months ago

Problem/Motivation

Form page shows this error:

Deprecated function: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in Drupal\node_action_log\Form\FilterForm->buildForm() (line 82 of modules/contrib/node_action_log/src/Form/FilterForm.php).
Drupal\node_action_log\Form\FilterForm->buildForm(Array, Object)

Steps to reproduce

Go to /admin/reports/nalog in php >=8.0

Proposed resolution

Change logic on FilterForm.php:80 to read

    uasort($filters_node_type, static function ($a, $b) {
      if ($a == $b) {
        return 0;
      }
      return $a > $b ? -1 : 1;
    });
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States Chris Dart

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024