• I’m using Events Manager v6.4.5.1 on WordPress Multisite and when I attempt to delete a site I get a PHP Fatal Error:

    PHP Fatal error:  Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, int given in /var/www/wp-content/plugins/events-manager/classes/em-events.php:267

    In the events-manager.php file the ’em_delete_blog’ function calls EM_Events::delete, passing an associative array (on line 1233). The EM_Events class ‘delete’ function checks if the first item in the array is an WP_Event object, but this throws a fatal error because ’em_delete_blog’ passed an Int as the first item in the array and ‘get_class’ expects an object to be passed. I’ve updated classes/em-events.php line 267 to be the following and everything appears to be working properly:

    if( !empty($array) && !is_a(current($array), '\EM_Event')){
Viewing 1 replies (of 1 total)
  • Same thing happened to me upon attempting to delete a site in multisite – thanks for the solution! I hope they update it soon.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal Error – WP Multisite – Delete Site’ is closed to new replies.