|  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: Assigned: danielc (profile)
Status: Closed Package: PECL bug system (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
35 - 27 = ?
Subscribe to this entry?

 [2004-12-30 04:04 UTC]
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:
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:

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


Add a Patch

Pull Requests

Add a Pull Request


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: Mon Jul 15 03:01:28 2024 UTC