: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Smush Abstract_API class that handles communications with WPMU DEV API: API class
* @package Smush\Core\Api
namespace Smush\Core\Api;
if ( ! defined( 'WPINC' ) ) {
abstract class Abstract_API {
* @param string $key API key.
* @throws Exception API Request exception.
public function __construct( $key ) {
// The Request class needs these to make requests.
if ( empty( $this->version ) || empty( $this->name ) ) {
throw new Exception( __( 'API instances require a version and name properties', 'wp-smushit' ), 404 );
$this->request = new Request( $this );