• I’m running a WordPress 6.6.2 multisite with Events Manager 6.6.3 (latest version as of today) and when I attempt to delete a site within the multisite it is failing due to a Fatal Error thrown by Events Manager.

    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:257

    This is in the delete method that is expected to receive an array of event_ids or EM_Events objects, however when the line 257 conditional check receives an array of ids and calls get_class (which expects its only parameter to be an object) it causes a fatal error.

    I changed this line from:

    if( !empty($array) && @get_class(current($array)) != 'EM_Event' ){

    to:

    if( !empty($array) && is_numeric(current($array))){

    This fixes the problem, however I’m hoping this or another solution can be integrated into future updates so that this can be fixed permanently.

  • You must be logged in to reply to this topic.