author list fails with empty filter

Created on 14 February 2022, over 2 years ago
Updated 14 April 2023, about 1 year ago

Problem/Motivation

The author list view fails if no filter is supplied - in php8.0 and php8.1

Steps to reproduce

visit the biblio/authors page

Proposed resolution

supply an empty array instead of false to the query is there is no filter. see attached patch

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇸🇪Sweden iliphil

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.

  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States cindytwilliams Nashville, TN

    This is also happening on the keyword list. Here is a patch that fixes the issue there as well.

  • 🇮🇳India keshav.k

    I have tested the patch. It is working as accepted. +1 for RTBC.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Thanks for the patch.

    It would be more maintainable if there was a variable declared at the top for the $args param to db_query(); it would start as an empty array. At the point that the filter is added to $where, add the ':filter', etc. to $args.

Production build 0.69.0 2024