: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (!defined('ABSPATH')) exit;
if (!class_exists('BVCallbackHandler')) :
class BVCallbackHandler {
public function __construct($db, $settings, $siteinfo, $request, $account, $response) {
$this->settings = $settings;
$this->siteinfo = $siteinfo;
$this->request = $request;
$this->account = $account;
$this->response = $response;
$this->bvinfo = new BVInfo($this->settings);
public function bvAdmExecuteWithoutUser() {
$this->execute(array("bvadmwithoutuser" => true));
public function bvAdmExecuteWithUser() {
$this->execute(array("bvadmwithuser" => true));
public function execute($resp = array()) {
$params = $this->request->params;
if (array_key_exists('disable_global_cache', $params)) {
$GLOBALS['_wp_using_ext_object_cache'] = false;
"request_info" => $this->request->info(),
"site_info" => $this->siteinfo->info(),
"account_info" => $this->account->info(),
"bvinfo" => $this->bvinfo->info(),
"api_pubkey" => substr(BVAccount::getApiPublicKey($this->settings), 0, 8)
$this->response->terminate($resp);
public function routeRequest() {
switch ($this->request->wing) {
require_once dirname( __FILE__ ) . '/wings/manage.php';
$module = new BVManageCallback($this);
require_once dirname( __FILE__ ) . '/wings/fs.php';
$module = new BVFSCallback($this);
require_once dirname( __FILE__ ) . '/wings/db.php';
$module = new BVDBCallback($this);
require_once dirname( __FILE__ ) . '/wings/info.php';
$module = new BVInfoCallback($this);
require_once dirname( __FILE__ ) . '/wings/dynsync.php';
$module = new BVDynSyncCallback($this);
require_once dirname( __FILE__ ) . '/wings/ipstore.php';
$module = new BVIPStoreCallback($this);
require_once dirname( __FILE__ ) . '/wings/watch.php';
$module = new BVWatchCallback($this);
require_once dirname( __FILE__ ) . '/wings/brand.php';
$module = new BVBrandCallback($this);
require_once dirname( __FILE__ ) . '/wings/protect.php';
$module = new BVProtectCallback($this);
require_once dirname( __FILE__ ) . '/wings/account.php';
$module = new BVAccountCallback($this);
require_once dirname( __FILE__ ) . '/wings/fs_write.php';
$module = new BVFSWriteCallback();
require_once dirname( __FILE__ ) . '/wings/actlog.php';
$module = new BVActLogCallback($this);
require_once dirname( __FILE__ ) . '/wings/speed.php';
$module = new BVSpeedCallback($this);
require_once dirname( __FILE__ ) . '/wings/security.php';
$module = new BVSecurityCallback($this);
require_once dirname( __FILE__ ) . '/wings/misc.php';
$module = new BVMiscCallback($this);
$resp = $module->process($this->request);
"statusmsg" => "Bad Command",
$this->request->wing => array(
$this->request->method => $resp
$this->response->addStatus("callbackresponse", $resp);