: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace StringLocator\REST;
use StringLocator\Base\REST;
class Clean extends REST {
protected $rest_base = 'clean';
public function __construct() {
public function register_rest_route() {
'callback' => array( $this, 'clean' ),
'permission_callback' => array( $this, 'permission_callback' ),
public function clean() {
$scan_data = get_transient( 'string-locator-search-overview' );
for ( $i = 0; $i < $scan_data->chunks; $i ++ ) {
delete_transient( 'string-locator-search-files-' . $i );
wp_send_json_success( true );