: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Smush\Core\Parser;
private $has_updates = false;
public function __construct( $value ) {
$this->previous_value = '';
public function set( $value ) {
if ( $value === $this->value ) {
* Don't do anything if the value hasn't changed.
* We don't want to do unnecessary string replacements.
$this->previous_value = $this->value;
$this->has_updates = true;
public function get_previous() {
return $this->previous_value;
public function has_updates() {
return $this->has_updates;