php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56257 "DB Error: syntax error" when editing a bug
Submitted: 2004-12-30 04:04 UTC Modified: 2004-12-30 11:00 UTC
From: kouber@php.net Assigned: danielc (profile)
Status: Closed Package: PECL bug system (PECL)
PHP Version: Irrelevant OS: Irrelevant
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: kouber@php.net
New email:
PHP Version: OS:

 

 [2004-12-30 04:04 UTC] kouber@php.net
Description:
------------
A "DB Error: syntax error" is thrown when I try to edit a bug and change the e-mail address (supply an e-mail in the "New email" field). Without providing information in that field everything works just fine.

So, I took a look at the source code:
http://cvs.php.net/co.php/pearweb/public_html/bugs/bug.php?r=1.72
and I thing I've found the bug. It is on line 275:           

$query .=  "email='{$_POST['in']['email']}',";

there have to be a leading space in the string assigned to $query:

$query .=  " email='{$_POST['in']['email']}',";

Otherwise, the query becomes "UPDATE bugdb SETemail=...", which is of course, syntactically incorrect.

Here it is the patch:

275c275
<             $query .=  "email='{$_POST['in']['email']}',";
---
>             $query .=  " email='{$_POST['in']['email']}',";


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-30 11:00 UTC] danielc at analysisandsolutions dot com
Thanks for reporting it and figuring it out.  Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC