Make WordPress Core

Opened 3 years ago

Last modified 20 months 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 Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version: 6.2.2
Severity: normal Keywords:
Cc: Focuses:

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
3 years ago

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

#2 @TwentyZeroTwo
3 years 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.


20 months ago

Note: See TracTickets for help on using tickets.