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;
});
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3345313-uasort-fix.patch | 558 bytes | chris dart |
Issue fork node_action_log-3343513
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
chris dart commentedHere's a patch from the above branch.
Comment #3
harivenuvHi @Chris Dart,
Thanks you for the patch, will review and merge
Comment #4
yash_khandelwal#2 patch is working fine for me. @harivenuv, please review once and apply the patch. Thanks
Comment #6
harivenuv