PHP7.4 notice in views with pager set to display 0 items

Created on 23 August 2020, about 4 years ago
Updated 21 August 2023, over 1 year ago

I have found out that whenever a view is set to have a full or mini pager with a setting of 0 Items per page (no limit) then undefined index notices appear on omega.theme.inc that have to do with lines 214, 222, 251 for the mini pager and lines 39, 62 for the full pager. Actually the mini pager displays this error on line 214 whatever the items per page setting.

For a full pager setting the view to display all items or a very big number is a solution but for a mini pager at least line 214 of omega.theme.incneeds to be ammended so as not to be found undefined.

Notice: Trying to access array offset on value of type null in omega_pager() (line 39 of /home/kwbirds/public_html/sites/all/themes/omega/omega/includes/omega.theme.inc).
Notice: Trying to access array offset on value of type null in omega_pager() (line 62 of /home/kwbirds/public_html/sites/all/themes/omega/omega/includes/omega.theme.inc).

Notice: Undefined index: quantity in omega_views_mini_pager() (line 214 of /home/kwbirds/public_html/sites/all/themes/omega/omega/includes/omega.theme.inc).
Notice: Trying to access array offset on value of type null in omega_views_mini_pager() (line 222 of /home/kwbirds/public_html/sites/all/themes/omega/omega/includes/omega.theme.inc).
Notice: Trying to access array offset on value of type null in omega_views_mini_pager() (line 251 of /home/kwbirds/public_html/sites/all/themes/omega/omega/includes/omega.theme.inc).

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇬🇷Greece arx-e

Live updates comments and jobs are added and updated live.
  • PHP 7.4

    The issue particularly affects sites running on PHP version 7.4.0 or later.

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.

  • 🇦🇺Australia fenstrat Australia

    This LGTM.

    Attached adds one more case where I was seeing Trying to access array offset on value of type null in omega_pager(). Leaving as RTBC.

Production build 0.71.5 2024