Make WordPress Core

Opened 19 months ago

Last modified 4 weeks ago

#58954 new defect (bug)

php 8.1 preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Reported by: twentyzerotwo's profile TwentyZeroTwo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2.2
Component: General Keywords:
Focuses: Cc:

Description

Encountered when editing a page at /wp-admin/post.php?post=2&action=edit

On line 6811 of wp-includes/post.php

 $ext     = preg_replace( '/^.+?\.([^.]+)$/', '$1', $file );

I found a lot of these tickets on trac, but couldnt find any for this specific instance.

Change History (3)

#1 @rajinsharwar
19 months ago

Hi @TwentyZeroTwo, can you try to remove, and re-attach the any attachments in the post?

#2 @TwentyZeroTwo
19 months ago

I can indeed, but surely the underlying deprecation error should be corrected?

This ticket was mentioned in Slack in #core-test by oglekler. View the logs.


4 weeks ago

Note: See TracTickets for help on using tickets.