Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../views/waf
File: option-rules.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
?>
[2] Fix | Delete
<ul id="wf-option-wafRules" class="wf-option wf-flex-vertical wf-flex-align-left">
[3] Fix | Delete
<li class="wf-option-title"><strong><?php esc_html_e('Rules', 'wordfence'); ?></strong> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_FIREWALL_WAF_RULES); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
[4] Fix | Delete
<li class="wf-option-subtitle"><?php echo ($firewall->isSubDirectoryInstallation() ? esc_html__('You are currently running the WAF from another WordPress installation. These rules can be disabled or enabled once you configure the firewall to run correctly on this site.', 'wordfence') : ''); ?></li>
[5] Fix | Delete
<li id="waf-rules-wrapper" class="wf-add-top"></li>
[6] Fix | Delete
<?php if (!WFWAF_SUBDIRECTORY_INSTALL): ?>
[7] Fix | Delete
<li id="waf-rules-manual-update">
[8] Fix | Delete
<ul class="wf-option wf-option-footer wf-padding-no-bottom">
[9] Fix | Delete
<li><a class="wf-btn wf-btn-default waf-rules-refresh" href="#" role="button"><?php esc_html_e('Manually Refresh Rules', 'wordfence'); ?></a>&nbsp;&nbsp;</li>
[10] Fix | Delete
<li class="wf-padding-add-top-xs-small"><em id="waf-rules-next-update"></em></li>
[11] Fix | Delete
</ul>
[12] Fix | Delete
<script type="application/javascript">
[13] Fix | Delete
(function($) {
[14] Fix | Delete
$('.waf-rules-refresh').on('click', function(e) {
[15] Fix | Delete
e.preventDefault();
[16] Fix | Delete
e.stopPropagation();
[17] Fix | Delete
[18] Fix | Delete
WFAD.wafUpdateRules();
[19] Fix | Delete
});
[20] Fix | Delete
})(jQuery);
[21] Fix | Delete
<?php
[22] Fix | Delete
try {
[23] Fix | Delete
$lastUpdated = wfWAF::getInstance()->getStorageEngine()->getConfig('rulesLastUpdated', null, 'transient');
[24] Fix | Delete
[25] Fix | Delete
$nextUpdate = PHP_INT_MAX;
[26] Fix | Delete
$cron = (array) wfWAF::getInstance()->getStorageEngine()->getConfig('cron', null, 'livewaf');
[27] Fix | Delete
if (is_array($cron)) {
[28] Fix | Delete
/** @var wfWAFCronEvent $event */
[29] Fix | Delete
foreach ($cron as $index => $event) {
[30] Fix | Delete
if ($event instanceof wfWAFCronFetchRulesEvent) {
[31] Fix | Delete
$event->setWaf(wfWAF::getInstance());
[32] Fix | Delete
if (!$event->isInPast()) {
[33] Fix | Delete
$nextUpdate = min($nextUpdate, $event->getFireTime());
[34] Fix | Delete
}
[35] Fix | Delete
}
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
catch (wfWAFStorageFileException $e) {
[40] Fix | Delete
error_log($e->getMessage());
[41] Fix | Delete
}
[42] Fix | Delete
catch (wfWAFStorageEngineMySQLiException $e) {
[43] Fix | Delete
error_log($e->getMessage());
[44] Fix | Delete
}
[45] Fix | Delete
if (!empty($lastUpdated)): ?>
[46] Fix | Delete
var lastUpdated = <?php echo (int) $lastUpdated ?>;
[47] Fix | Delete
WFAD.renderWAFRulesLastUpdated(new Date(lastUpdated * 1000));
[48] Fix | Delete
<?php endif ?>
[49] Fix | Delete
[50] Fix | Delete
<?php if ($nextUpdate < PHP_INT_MAX): ?>
[51] Fix | Delete
var nextUpdate = <?php echo (int) $nextUpdate ?>;
[52] Fix | Delete
WFAD.renderWAFRulesNextUpdate(new Date(nextUpdate * 1000));
[53] Fix | Delete
<?php endif ?>
[54] Fix | Delete
</script>
[55] Fix | Delete
</li>
[56] Fix | Delete
<?php endif ?>
[57] Fix | Delete
</ul>
[58] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function