|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [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 23:01:30 2024 UTC