cvs: pearweb /public_html/bugs bug.php
| From: | Greg Beaver | Date: | Wed, 25 Apr 2007 02:34:08 +0000 |
| Subject: | cvs: pearweb /public_html/bugs bug.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-46153@lists.php.net to get a copy of this message | ||
cellog Wed Apr 25 02:34:08 2007 UTC
Modified files:
/pearweb/public_html/bugs bug.php
Log:
fix Bug #10833 many, many notices in bug.php/functions.inc
# more notices in bug.php
http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug.php?r1=1.156&r2=1.157&diff_format=u
Index: pearweb/public_html/bugs/bug.php
diff -u pearweb/public_html/bugs/bug.php:1.156 pearweb/public_html/bugs/bug.php:1.157
--- pearweb/public_html/bugs/bug.php:1.156 Wed Apr 25 02:28:07 2007
+++ pearweb/public_html/bugs/bug.php Wed Apr 25 02:34:08 2007
@@ -15,7 +15,7 @@
* @package Bugs
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: bug.php,v 1.156 2007/04/25 02:28:07 cellog Exp $
+ * @version $Id: bug.php,v 1.157 2007/04/25 02:34:08 cellog Exp $
*/
/*
@@ -78,13 +78,13 @@
}
// captcha is not necessary if the user is logged in
-if ($auth_user && $auth_user->registered) {
+if (isset($auth_user) && $auth_user && $auth_user->registered) {
if (isset($_SESSION['answer'])) {
unset($_SESSION['answer']);
}
}
-if ($auth_user && $auth_user->registered &&
isset($_GET['delete_comment'])) {
+if (isset($auth_user) && $auth_user && $auth_user->registered &&
isset($_GET['delete_comment'])) {
$delete_comment = (int)$_GET['delete_comment'];
} else {
$delete_comment = false;
@@ -133,7 +133,7 @@
if ($edit == 1) {
- if ($auth_user) {
+ if (isset($auth_user) && $auth_user) {
if (auth_check('pear.bug') && !auth_check('pear.dev')
&&
$bug['bughandle'] != $auth_user->handle) {
$edit = 3; // can't edit a bug you didn't create
@@ -163,7 +163,7 @@
$user = htmlspecialchars(rinse($_POST['user']));
}
$pw = rinse($_POST['pw']);
-} elseif ($auth_user && $auth_user->handle && $edit == 1) {
+} elseif (isset($auth_user) && $auth_user && $auth_user->handle && $edit
== 1) {
$user = rinse($auth_user->handle);
$pw = rinse($auth_user->password);
} elseif (isset($_COOKIE['MAGIC_COOKIE'])) {
@@ -264,7 +264,7 @@
}
// try to verify the user
- if ($auth_user) {
+ if (isset($auth_user) && $auth_user) {
$_POST['in']['handle'] = $auth_user->handle;
}
@@ -275,7 +275,7 @@
if (!$errors) {
do {
- if (!$auth_user) {
+ if (!isset($auth_user) || !$auth_user) {
// user doesn't exist yet
require 'bugs/pear-bug-accountrequest.php';
$buggie = new PEAR_Bug_Accountrequest;
@@ -703,7 +703,7 @@
<?php
control(0, 'View');
-if (!($auth_user && $auth_user->registered) && $edit != 2) {
+if (!(isset($auth_user) && $auth_user && $auth_user->registered) &&
$edit != 2) {
control(3, 'Add Comment');
}
control(1, 'Edit');
@@ -715,7 +715,7 @@
if (isset($_POST['preview']) && !empty($ncomment)) {
$preview = '<div class="comment">';
$preview .= "<strong>[" . format_date(time()) . "] ";
- if ($auth_user) {
+ if (isset($auth_user) && $auth_user) {
$preview .= '<a href="/user/' . $auth_user->handle .
'">' .
$auth_user->handle . '</a>';
} else {
@@ -1033,7 +1033,7 @@
<?php
} // if ($edit == 1 || $edit == 2)
-if ($auth_user && $auth_user->registered) {
+if (isset($auth_user) && $auth_user && $auth_user->registered) {
?>
<div class="explain">
@@ -1061,7 +1061,7 @@
$action = htmlspecialchars($_SERVER['PHP_SELF']);
?>
<form name="comment" id="comment" action="<?php echo $action
?>" method="post">
-<?php if ($auth_user): ?>
+<?php if (isset($auth_user) && $auth_user): ?>
<div class="explain">
<h1><a href="/bugs/patch-add.php?bug=<?php echo $id ?>">Click Here
to Submit a Patch</a></h1>
</div>
@@ -1093,7 +1093,7 @@
<table>
- <?php if (!$auth_user): ?>
+ <?php if (!isset($auth_user) || !$auth_user): ?>
<tr>
<th class="details">Y<span class="accesskey">o</span>ur
email address:<br />
<strong>MUST BE VALID</strong></th>