: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
wfWAFI18n::setInstance(new wfWAFI18n(new wfWAFWordPressI18n($wfWAFStorageEngine)));
wfWAF::getInstance()->run();
} catch (wfWAFBuildRulesException $e) {
error_log($e->getMessage());
} catch (wfWAFStorageFileConfigException $e) {
// Let this request through for now
error_log($e->getMessage());
} catch (wfWAFStorageEngineMySQLiException $e) {
// Let this request through for now
error_log($e->getMessage());
} catch (wfWAFStorageFileException $e) {
// We need to choose another storage engine here.
catch (Exception $e) { // In PHP 5, Throwable does not exist
error_log("An unexpected exception occurred during WAF execution: {$e}");
error_log("An unexpected exception occurred during WAF execution: {$t}");
if (class_exists('ParseError') && $t instanceof ParseError) {
if (wfWAF::getInstance() === null) {
require_once __DIR__ . '/dummy.php';
wfWAF::setInstance(new wfDummyWaf());
define('WFWAF_RUN_COMPLETE', true);