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

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/wp-conte.../plugins/themify-.../js/editor
File: cleaner.mjs
import fs from "fs";
[0] Fix | Delete
const platform = process.platform,
[1] Fix | Delete
OSTYPE=process.env.OSTYPE;
[2] Fix | Delete
if(platform !== 'win32' && platform !== 'darwin' && OSTYPE !== 'cygwin' && OSTYPE !== 'msys'){//For accidently remove in local. This should work only in prod(linux) for deploy
[3] Fix | Delete
const dirs=[
[4] Fix | Delete
'./cleaner.mjs',
[5] Fix | Delete
'./themify-builder-app.mjs',
[6] Fix | Delete
'./package.json',
[7] Fix | Delete
'./webpack.config.mjs',
[8] Fix | Delete
'./modules',
[9] Fix | Delete
'./components'
[10] Fix | Delete
];
[11] Fix | Delete
for(let i=dirs.length-1;i>-1;--i){
[12] Fix | Delete
try {
[13] Fix | Delete
fs.rmSync( dirs[i], {
[14] Fix | Delete
force:true,
[15] Fix | Delete
recursive:true,
[16] Fix | Delete
maxRetries:2
[17] Fix | Delete
} );
[18] Fix | Delete
}
[19] Fix | Delete
catch (e) {
[20] Fix | Delete
console.error(e);
[21] Fix | Delete
}
[22] Fix | Delete
}
[23] Fix | Delete
}
[24] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function