Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in views_handler_field_file_extension->render() (line 43 of views/modules/system/views_handler_field_file_extension.inc)

This issue is showing whenever there is a relationship with File:fid and the view is showing Field File:extension.

Issue fork views-3323256

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:

Comments

dilpreet_singh created an issue. See original summary.

damienmckenna’s picture

Status: Needs work » Active

Thank you for opening the bug report.

Can you please explain how to trigger this problem? Are you able to replicate the problem using a base install of Drupal core and the Views module, or do you need additional modules or custom code to cause it?

FYI, the "needs work" status is for when an issue has been worked on, a potential solution was provided, but it was deemed this solution needed further work, it is not intended as a flag to indicate "someone needs to work on this"; when opening a new issue the appropriate status is "active" unless a patch or other proposed solution is provided.

NivethaSubramaniyan made their first commit to this issue’s fork.

dilpreet_singh’s picture

Version: 7.x-3.26 » 7.x-3.x-dev
Issue summary: View changes
Status: Active » Needs review
Issue tags: -PHP 7.2 +PHP 8.1
StatusFileSize
new685 bytes

Here is the patch that fixes it for PHP 8.1.

dilpreet_singh’s picture

Thanks, Damien for your comment. I have added a bit more info for the issue summary.

Just learning the process.

damienmckenna’s picture

Thank you!

Could you please upload an example view that causes the error? We can turn it into a patch.