WordPress displays 500 error on PHP errors

For some reason WP is showing a generic 500 Internal Server Error page when I have PHP errors in my code. I have set WP_DEBUG to true, and the following settings in my php.ini file:

error_reporting = -1
log_errors = On
display_errors = On

I tried triggering an error in my index.php and wp-config.php files and at that point errors are displayed fine, if I have a PHP error in my theme files then the 500 error page is shown so I guess it might be some custom error handling function running somewhere?

Topic 500-internal-error internal-server-error fatal-error errors Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.