php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30500 phpweb/cvs-php.php E_ALL fixes
Submitted: 2004-10-20 18:50 UTC Modified: 2004-10-24 15:53 UTC
From: toni dot viemero at iki dot fi Assigned: goba (profile)
Status: Closed Package: Website problem
PHP Version: 5.0.2 OS: FreeBSD 5.3-RC1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: toni dot viemero at iki dot fi
New email:
PHP Version: OS:

 

 [2004-10-20 18:50 UTC] toni dot viemero at iki dot fi
Description:
------------
cvs-php.php reports undefined index errors on form elements

Here's the fix:

--- cvs-php.php.orig    Wed Oct 20 19:42:54 2004
+++ cvs-php.php Wed Oct 20 19:45:01 2004
@@ -289,12 +289,12 @@
 <tr>
  <th class="subr">Full Name:</th>
  <td><input type="text" size="50" name="fullname"
-      class="max" value="<?php echo clean($_POST['fullname']);?>" /></td>
+      class="max" value="<?php if (isset($_POST['fullname'])) echo clean($_POST['fullname']);?>" /></td>
 </tr>
 <tr>
  <th class="subr">Email:</th>
  <td><input type="text" size="50" name="email"
-      class="max" value="<?php echo clean($_POST['email']);?>" /></td>
+      class="max" value="<?php if (isset($_POST['email'])) echo clean($_POST['email']);?>" /></td>
 </tr>
 <tr>
  <th class="subr">For what purpose do you require a CVS account:<br/ >
@@ -314,17 +314,17 @@
 </tr>
 <tr>
  <th class="subr">If your intended purpose is not in the list, <br>please state it here:</th>
- <td><textarea cols="50" rows="5" name="realpurpose" class="max"><?php echo clean($_POST['realpurpose']);?></textarea></td>
+ <td><textarea cols="50" rows="5" name="realpurpose" class="max"><?php if (isset($_POST['realpurpose'])) echo clean($_POST['realpurpose']);?></textarea></td>
 </tr>
 <tr>
  <th class="subr">User ID:<br /> <small>(single word, lower case)</small></th>
  <td><input type="text" size="10" name="id"
-      class="max" value="<?php echo clean($_POST['id']);?>" /></td>
+      class="max" value="<?php if (isset($_POST['id'])) echo clean($_POST['id']);?>" /></td>
 </tr>
 <tr>
  <th class="subr">Requested Password:</th>
  <td><input type="password" size="10" name="password"
-      class="max" value="<?php echo clean($_POST['password']);?>" /></td>
+      class="max" value="<?php if (isset($_POST['password'])) echo clean($_POST['password']);?>" /></td>
 </tr>
 <tr>
  <th colspan="2"><input type="submit" value="Send Request" /></th>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-20 18:59 UTC] goba@php.net
Would you please upload this patch somwhere, so that it does not wrap? I am unable to apply it this way.
 [2004-10-20 19:10 UTC] toni dot viemero at iki dot fi
http://selfdestruct.net/misc/phpweb.diff.txt
 [2004-10-24 15:53 UTC] goba@php.net
Patch applied, thanks.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 08:00:02 2026 UTC