Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../includes
File: amp-optimizer-addon.php
<?php
[0] Fix | Delete
if (true == ampforwp_get_setting('amp-server-side-rendering')) {
[1] Fix | Delete
add_filter('ampforwp_the_content_last_filter', 'ampforwp_add_optimizer_addon',12);// phpcs:ignore PHPCompatibility.Constants.NewConstants.php_int_minFound
[2] Fix | Delete
}
[3] Fix | Delete
function ampforwp_add_optimizer_addon($output_buffer){
[4] Fix | Delete
$ssr_settings = add_filter(
[5] Fix | Delete
'amp_enable_ssr', true, defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : ~PHP_INT_MAX // phpcs:ignore PHPCompatibility.Constants.NewConstants.php_int_minFound
[6] Fix | Delete
);
[7] Fix | Delete
if(!$ssr_settings){ return $output_buffer; }
[8] Fix | Delete
if(!class_exists('AmpProject\Optimizer\Transformer\AmpRuntimeCss')){
[9] Fix | Delete
require_once AMPFORWP_PLUGIN_DIR."/includes/vendor/css-parser/autoload.php";
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
$transformationEngine = new AmpProject\Optimizer\TransformationEngine(new AmpProject\Optimizer\DefaultConfiguration());
[13] Fix | Delete
$errorCollection = new AmpProject\Optimizer\ErrorCollection;
[14] Fix | Delete
[15] Fix | Delete
$optimizedHtml = $transformationEngine->optimizeHtml( $output_buffer,$errorCollection);
[16] Fix | Delete
[17] Fix | Delete
//Handle and log the error
[18] Fix | Delete
if($errorCollection->count()>0){
[19] Fix | Delete
foreach ($errorCollection as $error) {
[20] Fix | Delete
new WP_Error( $error->getCode(), $error->getMessage());
[21] Fix | Delete
}
[22] Fix | Delete
}
[23] Fix | Delete
return $optimizedHtml;
[24] Fix | Delete
}
[25] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function