BugReporter::setPingStatus PHP Method

setPingStatus() public method

When pinging status is is set to false, pingServer() returns true without actually pinging the server.
public setPingStatus ( $p_pingingStatus ) : void
return void
    public function setPingStatus($p_pingingStatus)
    {
        if (!is_bool($p_pingingStatus)) {
            trigger_error($this->invalidParam);
        } else {
            $this->m_disablePing = !$p_pingingStatus;
        }
    }

Usage Example

Example #1
0
function camp_call_bug_reporter($p_number, $p_string, $p_file, $p_line)
{
    global $ADMIN_DIR, $ADMIN, $Campsite;
    require_once ($GLOBALS['g_campsiteDir'] . "/classes/BugReporter.php");

    // --- Don't print the previous screen (in which the error occurred) ---
    ob_end_clean();

    echo "<html><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n<tr><td>\n";
    require_once($Campsite['HTML_DIR'] . "/$ADMIN_DIR/menu.php");
    echo "</td></tr>\n<tr><td>\n";

    $reporter = new BugReporter ($p_number, $p_string, $p_file, $p_line, "Campsite", $Campsite['VERSION']);
    $reporter->setPingStatus(false);

    include ($Campsite['HTML_DIR'] . "/bugreporter/senderrorform.php");

    $buffer = ob_get_contents();

    echo ($buffer);

    exit();
}