Replaced prn_r() function with dump() (#730)

This commit is contained in:
Roman Kelesidis 2023-05-29 12:08:07 +07:00 committed by GitHub
commit 20837e08ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 20 deletions

View file

@ -195,11 +195,11 @@ if ($check_attachments) {
}
}
if ($debug_mode) {
prn_r($orphan_files, '$orphan_files');
prn_r($orphan_db_attach, '$orphan_db_attach');
prn_r($orphan_tor, '$orphan_tor');
prn_r($posts_without_attach, '$posts_without_attach');
prn_r($topics_without_attach, '$topics_without_attach');
dump($orphan_files);
dump($orphan_db_attach);
dump($orphan_tor);
dump($posts_without_attach);
dump($topics_without_attach);
}
DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl");

View file

@ -344,21 +344,6 @@ function bb_exit($output = '')
exit;
}
/**
* @param $var
* @param string $title
* @param bool $print
* @return string
*/
function prn_r($var, $title = '', $print = true)
{
$r = '<pre>' . ($title ? "<b>$title</b>\n\n" : '') . htmlspecialchars(print_r($var, true)) . '</pre>';
if ($print) {
echo $r;
}
return $r;
}
/**
* Convert special characters to HTML entities
*