Site breaks with PHP errors on Drupal 10

Created on 18 September 2023, about 2 years ago

Problem/Motivation

After an upgrade to Drupal 10 I see this error when I try to go to a page with 'previous' 'next' buttons:

TypeError: pager_for_content_type_get_pager_more_links(): Argument #1 ($node) must be of type array, Drupal\node\Entity\Node given, called in /web/modules/contrib/pager_for_content_type/pager_for_content_type.module on line 65 in pager_for_content_type_get_pager_more_links() (line 199 of modules/contrib/pager_for_content_type/pager_for_content_type.module).

Steps to reproduce

upgrade site to Drupal 10.
Visit a page where Pager for Content type is enabled

Proposed resolution

At line 199 of pager_for_content_type.module delete 'array '

πŸ› Bug report
Status

Active

Version

1.3

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom caprenter

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

Comments & Activities

  • Issue created by @caprenter
  • @caprenter opened merge request.
  • Assigned to schiavone
  • πŸ‡ΊπŸ‡ΈUnited States schiavone
  • Status changed to Needs review 2 months ago
  • πŸ‡¦πŸ‡ΊAustralia marc.groth

    The patch applies for me and fixes the issue. It's a minor change and looks correct since the expected parameter is not an array.

    I'd mark as RTBC but I'm not sure how many people need to confirm the solution to be working (so far it's only me).

Production build 0.71.5 2024