• Resolved vralle

    (@vit-1)


    Hi!

    WP 6.0.3 MS
    WP Cerber 9.0
    Apache
    PHP 7.4.32 cgi-fcgi

    Global admin panel gives an error:

    Use of undefined constant UPLOADBLOGSDIR - assumed 'UPLOADBLOGSDIR' (this will throw an Error in a future version of PHP) in .../wp-cerber/wp-cerber.php on line 148

    Website crash when going to PHP 8+

    • This topic was modified 2 years, 1 month ago by vralle.
    • This topic was modified 2 years, 1 month ago by vralle.
    • This topic was modified 2 years, 1 month ago by vralle.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter vralle

    (@vit-1)

    L120:

    static $dir = null;

    L148-152:

    $dir = ABSPATH.UPLOADBLOGSDIR;
    if ( ! file_exists( $dir ) ) {
    	$dir = false;
    }

    Proposal L145-152:

    elseif (defined('UPLOADBLOGSDIR'))
    {
    	// A custom path has been configured by site admin?
    	// see also UPLOADS,  BLOGUPLOADDIR, BLOGUPLOADDIR
    	$path = ABSPATH.UPLOADBLOGSDIR;
    	if ( file_exists( $path ) ) { // $dir = null by default
    		$dir = $path;
    	}
    }
    • This reply was modified 2 years, 1 month ago by vralle.
    Plugin Author gioni

    (@gioni)

    Hi! Thank you for your report and proposals. We’ll be working on it soon.

    Thread Starter vralle

    (@vit-1)

    WP Cerber has been updated several times to version 9.3.3.
    PHP 7.4 will go end of life on 28 November 2022.
    The line of code causing the fatal error in PHP 8+ has not changed.

    Gregory, is there any way I can help you with the fixes?

    Plugin Author gioni

    (@gioni)

    Thanks, I appreciate your willingness to help! A new version of WP Cerber with the fix will be available the next week.

    Plugin Author gioni

    (@gioni)

    It’s been fixed in the latest version: https://wpcerber.com/wp-cerber-security-9-4/

    Thread Starter vralle

    (@vit-1)

    This is great news. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘undefined constant UPLOADBLOGSDIR’ is closed to new replies.