uasort(): Returning bool from comparison function is deprecated

Created on 31 March 2023, over 1 year ago
Updated 21 June 2024, 6 months ago

Problem/Motivation

PHP 8 throws the error:
Deprecated function: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in LinkitProfile->setEnabledsearchPlugins() (line 59 of /includes/profile.class.php).

Steps to reproduce

Install Linkit on PHP 8. Use linkit to create a link and start typing into the autocomplete field.

Proposed resolution

Change the uasort function linkit_sort_plugins_by_weight() to what core and other contrib use to return an integer rather than a boolean.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇨🇦Canada darkodev

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

Production build 0.71.5 2024