: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$logData = strip_tags($shortLog);
$logData .= ' (' . implode(', ', $metadata) . ')';
$table[] = array($logData);
echo wfHelperString::plainTextTable($table) . "\n\n";
## <?php esc_html_e('Scan Issues', 'wordfence') ?> ##
$issues = wfIssues::shared()->getIssues(0, 50, 0, 50);
$issueCounts = array_merge(array('new' => 0, 'ignoreP' => 0, 'ignoreC' => 0), wfIssues::shared()->getIssueCounts());
$issueTypes = wfIssues::validIssueTypes();
printf(__('New Issues (%d total)', 'wordfence'), $issueCounts['new']);
if (isset($issues['new']) && count($issues['new'])) {
foreach ($issues['new'] as $i) {
if (!in_array($i['type'], $issueTypes)) {
$viewContent = wfView::create('scanner/issue-' . $i['type'], array('textOutput' => $i))->render();
catch (wfViewNotFoundException $e) {
//Ignore -- should never happen since we validate the type
if (!empty($viewContent)) {
echo strip_tags($viewContent) . "\n\n";
_e('No New Issues', 'wordfence');
## <?php esc_html_e('Wordfence Settings', 'wordfence') ?>: <?php esc_html_e('Diagnostic Wordfence settings/constants.', 'wordfence') ?> ##
__('Setting', 'wordfence'),
__('Value', 'wordfence'),
foreach (wfDiagnostic::getWordfenceValues() as $settingData) {
if (isset($settingData['subheader'])) {
$table[] = strip_tags($settingData['subheader']);
$escapedDescription = strip_tags($settingData['description']);
$escapedValue = __('(not set)', 'wordfence');
if (isset($settingData['value'])) {
$escapedValue = strip_tags($settingData['value']);
echo wfHelperString::plainTextTable($table) . "\n\n";
## <?php esc_html_e('Wordfence Central', 'wordfence') ?>: <?php esc_html_e('Diagnostic connection information for Wordfence Central.', 'wordfence') ?> ##
__('Value', 'wordfence'),
foreach (wfDiagnostic::getWordfenceCentralValues() as $settingData) {
if (isset($settingData['subheader'])) {
$table[] = strip_tags($settingData['subheader']);
$escapedDescription = strip_tags($settingData['description']);
$escapedValue = __('(not set)', 'wordfence');
if (isset($settingData['value'])) {
$escapedValue = strip_tags($settingData['value']);
echo wfHelperString::plainTextTable($table) . "\n\n";
if (wfUtils::funcEnabled('phpinfo')) { phpinfo(); } else { echo "\n\n" . __('Unable to output phpinfo content because it is disabled', 'wordfence') . "\n\n"; }
$phpinfo = ob_get_clean();
if (preg_match_all('#(?:<h2>(.*?)</h2>\s*)?<table[^>]*>(.*?)</table>#is', $phpinfo, $tableMatches)) {
foreach ($tableMatches[2] as $countIndex => $tableContents) {
if (preg_match_all('#<tr[^>]*>(.*?)</tr>#is', $tableContents, $rowMatches)) {
foreach ($rowMatches[1] as $rowContents) {
if (preg_match_all('#<t[hd][^>]*>(.*?)</t[hd]>#is', $rowContents, $colMatches)) {
foreach ($colMatches[1] as $colContents) {
$row[] = trim(strip_tags(html_entity_decode($colContents)));
if (array_key_exists($countIndex, $tableMatches[1]) && $tableMatches[1][$countIndex]) {
echo "## " . strip_tags($tableMatches[1][$countIndex]) . " ##\n\n";
$tableString = wfHelperString::plainTextTable($table);
echo $tableString . "\n\n";