• Resolved mariecharton

    (@mariecharton)


    Hi,
    Since the update version 8.1.0 with iThemes Security Site Scanner, we have a problem in our Logs :

    [25-Apr-2022 20:18:30 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_subject() on null in /home/XXXX/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/class-notification-center.php:516
    Stack trace:
    #0 /home/XXXX/public_html/wp-content/plugins/better-wp-security/core/modules/site-scanner/mail.php(20): ITSEC_Notification_Center->send('malware-schedul...', NULL)
    #1 /home/XXXX/public_html/wp-content/plugins/better-wp-security/core/modules/malware-scheduling/class-itsec-malware-scheduling-scanner.php(73): ITSEC_Site_Scanner_Mail::send(Object(iThemesSecurity\Site_Scanner\Scan))
    #2 /home/XXXX/public_html/wp-content/plugins/better-wp-security/core/modules/malware-scheduling/class-itsec-malware-scheduling-scanner.php(31): ITSEC_Malware_Scheduling_Scanner::send_email(Object(iThemesSecurity\Site_Scanner\Scan))
    #3 /home/XXXX/public_html/wp-content/plugins/better-wp-security/core/modules/malware-scheduling/class-itsec-malware-scheduling.php(29): ITSEC_Malware_Scheduling_Scanner::scan()
    #4 /home/XXXX/ in /home/wpchef/public_html/wp-content/plugins/better-wp-security/core/modules/notification-center/class-notification-center.php on line 516

    We try some differents parameters but nothing change.
    Any idea how to fix this ?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,
    I have the same error since the activation of site scanner.

    Could it be related to there being no subject, and no option to customize the subject, for the site scanner notification email?

    Got the same errors in my logs.

    Hi mariecharton,

    It’s a (new) bug introduced in the 8.1 release. Updating to the 8.1.1 release will not fix this.

    Either disable the Site Scan Results notification or fix the code.

    Temporary fix:

    – Make a copy of the better-wp-security/core/modules/site-scanner/mail.php file and then edit it.

    – Change the first class method (send()) so that it looks like below:

    public static function send( Scan $scan ) {
    	$mail = static::get_mail( $scan );
    	if ( is_null( $mail ) ) {
    	 	return true;
    	}
    
    	$nc = ITSEC_Core::get_notification_center();
    	return $nc->send( 'malware-scheduling', $mail );
    }

    Untested, so try the fixed code at your own risk.

    +++++ To prevent any confusion, I’m not iThemes +++++

    @timothyblynjacobs

    Don’t attempt sending an email when a site scan returns a clean result.

    • This reply was modified 2 years, 7 months ago by nlpro.
    • This reply was modified 2 years, 7 months ago by nlpro.
    Thread Starter mariecharton

    (@mariecharton)

    Thanks for your answer, do you plan to fix this in a future update?

    Plugin Author Timothy Jacobs

    (@timothyblynjacobs)

    Hi All,

    We’ve just released 8.1.2 which should fix this issue for you.

    I’m sorry for the inconvenience.

    – Timothy

    Thread Starter mariecharton

    (@mariecharton)

    Thanks Timothy for your prompt response !

    @mariecharton

    I guess this topic can be marked as ‘Resolved’.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error in Log since 8.1.0 with Site Scanner’ is closed to new replies.