uasort deprecation in PHP 8

Created on 26 April 2021, over 3 years ago
Updated 9 January 2024, 10 months ago

Returning a boolean from a uasort comparison function is deprecated in PHP 8 and produces a warning on the group type permissions form. Switching the comparison to use the spaceship operator fixes this.

Symptoms

(for people can find this issue more easily)

Deprecated function: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in Drupal\group\Access\GroupPermissionHandler->sortPermissions() (line 268 of modules/contrib/group/src/Access/GroupPermissionHandler.php).

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇺🇸United States davisben NH

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

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