• Resolved Saulius

    (@sauliuksss1)


    Hi, the website is facing wp-optimize / minify / class-wp-optimize-minify-functions.php on line 1112 error. Attach a photo. The latest versions are used.

    foreach ($possible_urls as $possible_url => $path) {
    	$pos = strpos($url, $possible_url);
    	if (false !== $pos) {
    		$file = substr_replace($url, $path, $pos, strlen($possible_url));
    		break;
    	}
    }
    if (file_exists($file)) {
    	return filesize($file);
    }

    optimize

Viewing 4 replies - 1 through 4 (of 4 total)
  • @sauliuksss1 Could you please edit wp-config.php file and

    Replace

    define('WP_DEBUG', false);

    with this:

    ini_set('log_errors','On');
    
    ini_set('display_errors','Off');
    
    ini_set('error_reporting', E_ALL );
    
    define('WP_DEBUG', false);
    
    define('WP_DEBUG_LOG', true);
    
    define('WP_DEBUG_DISPLAY', false);

    Let us know if the warnings go away after replacing the above code.

    I’m getting that same error plastered all over my log.

    [15-Dec-2021 00:13:13 UTC] PHP Notice:  Undefined variable: file in /path/to/wp/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-functions.php on line 1112
    

    I can’t try your suggestion as stated above because I have WP_DEBUG set to true:

    define('WP_DEBUG', true); // set true
    if ( WP_DEBUG ) {
        define('WP_DEBUG_LOG', '/path/to/debug/debug.log' );
        define('WP_DEBUG_DISPLAY', false);  // don't display errors on pages
        @ini_set( 'display_errors', 0 );
    }

    @jwmc This will be fixed in next release.

    FYI, I did replace my debug directives with what you had. I’m not getting that error anymore, but I haven’t gotten any debug messages in any error log at all for the last 14 hours, which is unusual.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp-optimize/minify/class-wp-optimize-minify-functions.php on line 1112’ is closed to new replies.