PHP Warning after upgrading to WordPress 5.1
-
Updated WordPress to version 5.1 and PHP Warning appeared:
session_start(): Cannot send session cookie - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963 session_start(): Cannot send session cache limiter - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963 Cannot modify header information - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1353
We managed to solve the problem by adding a condition to the function start_session in the file
/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963The solution looks like this:
private function start_session(){ if ( !defined( 'DOING_CRON' ) ){ session_id() or session_start(); } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Warning after upgrading to WordPress 5.1’ is closed to new replies.