Wordpress error when updating PHP to version 8.0

Viewed 31

I am trying to update the PHP version to 8.0 on an old WordPress site. It works fine on PHP 7.4 but when I switch to PHP 8.0 I get the following error:

There has been a critical error on this website. Please check your site admin email inbox for instructions. This is for anything in the admin.

The error log shows: Fatal error: Uncaught Error: Call to undefined function ini_set() /public_html/wp-includes/functions.php:7527

This is line 7527 in functions.php

if ( false !== ini_set( 'memory_limit', $wp_max_limit ) ) {

Stack trace:

Stack trace:
#0 /public_html/wp-admin/admin.php(162): wp_raise_memory_limit('admin')
#1 /public_html/wp-admin/post.php(12): require_once('/home/MYAPPNAME/...')
#2 {main}
0 Answers
Related