Problem/Motivation

Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in template_preprocess_date_views_pager()

Steps to reproduce

Appears when pager by date is used on the block display of the view. It don't have url so in the line 88 of date_views/theme/theme.inc:
$prev_path = str_replace($date_info->date_arg, $prev_arg, $date_info->url);
the $date_info->url = null and it causes appearing the deprecation message.

Proposed resolution

I propose to delete $prev_path computing as it's an unused variable.

CommentFileSizeAuthor
#3 3414330-3.patch1.19 KBkeshavv

Issue fork date-3414330

Command icon 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:

  • 7.x-2.x Comparecompare
  • 3414330-php8.1-deprecation-in Comparecompare

Comments

Volha_Si created an issue. See original summary.

volha_si’s picture

Status: Active » Needs review
keshavv’s picture

StatusFileSize
new1.19 KB

Removed unused variables and fixed issues. Please review the patch.

volha_si’s picture

I've checked - the keshavv's patch fixes the issue.