WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#52225 closed defect (bug) (duplicate)

PHP 8 issue: Fatal error when error_reporting is disabled

Reported by: fijisunshine Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.6
Component: Security Keywords:
Focuses: Cc:

Description

I had posted this in the Support > Everything else WordPress forum and the moderator, James Huff, asked me to create a ticket with you.

For security reasons, I've always disabled the function "error_reporting" in php.ini unless I'm debugging. Disabling this function works great in php 7.4 – WordPress doesn't output error messages to the error log, it just outputs a message to the error log that error_reporting is disabled for security reasons.

But in php 8.0, I'm getting this error:

PHP Fatal error: Uncaught Error: Call to undefined function error_reporting() in … /wp-load.php:24

In php 7.4, it wouldn't be a fatal error. It would just say that error_reporting is disabled for security reasons.

Can you update WordPress so that it won't have fatal errors when error_reporting is disabled in php.ini for security reasons? Thank you

Change History (2)

#1 @mukesh27
4 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #52226

#2 @SergeyBiryukov
4 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.