private, visitor_ip ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, "Open", NOW(), ?, INET_ATON(?)) ')->execute(array($package_name, $_POST['in']['bug_type'], $_POST['in']['email'], $_POST['in']['sdesc'], $fdesc, $_POST['in']['php_version'], $_POST['in']['php_os'], bugs_get_hash($_POST['in']['passwd']), $_POST['in']['reporter_name'], $_POST['in']['private'], $_SERVER['REMOTE_ADDR'])); if (PEAR::isError($res)) { echo "<pre>"; var_dump($_POST['in'], $fdesc, $package_name); die($res->getMessage()); } $cid = $dbh->lastInsertId(); $redirectToPatchAdd = false; if (!empty($_POST['in']['patchname']) && $_POST['in']['patchname']) { require_once "{$ROOT_DIR}/include/classes/bug_patchtracker.php"; $tracker = new Bug_Patchtracker(); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $patchrevision = $tracker->attach($cid, 'patchfile', $_POST['in']['patchname'], $_POST['in']['handle'], array()); PEAR::staticPopErrorHandling(); if (PEAR::isError($patchrevision)) { $redirectToPatchAdd = true; } } if (empty($_POST['in']['handle'])) { $mailfrom = spam_protect($_POST['in']['email'], 'text'); } else { $mailfrom = $_POST['in']['handle']; } $report = <<<REPORT From: {$mailfrom} Operating system: {$_POST['in']['php_os']} PHP version: {$_POST['in']['php_version']} Package: {$package_name}
if (!is_valid_email($email, $logged_in)) { $errors[] = 'Email address must be valid!'; } /** * Check if session answer is set, then compare * it with the post captcha value. If it's not * the same, then it's an incorrect password. */ if (!isset($_SESSION['answer']) || $_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } if (count($errors)) { throw new Exception(''); } PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $e = $patchinfo->attach($bug_id, 'patch', $patch_name, $email, $_POST['obsoleted']); PEAR::popErrorHandling(); if (PEAR::isError($e)) { $patches = $patchinfo->listPatches($bug_id); $errors[] = $e->getMessage(); $errors[] = 'Could not attach patch "' . htmlspecialchars($patch_name) . '" to Bug #' . $bug_id; include "{$ROOT_DIR}/templates/addpatch.php"; exit; } redirect("patch-display.php?bug={$bug_id}&patch={$patch_name_url}&revision={$e}"); } catch (Exception $e) { $patches = $patchinfo->listPatches($bug_id); include "{$ROOT_DIR}/templates/addpatch.php"; exit; } } else {