View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004787 | mantisbt | bugtracker | public | 2004-10-28 07:24 | 2005-04-18 10:34 |
Reporter | Thox | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | git trunk | ||||
Fixed in Version | 1.0.0a1 | ||||
Summary | 0004787: Issue Summary is marked as updated when it contains 'quotes' or "double quotes" | ||||
Description | When an issue summary field has quotes in (' or "), the summary field is always marked as changed when the issue is updated. This is an 'example' => This is an \'example\' | ||||
Tags | No tags attached. | ||||
Attached Files | patch.diff (159 bytes)
698c698,699 < $c_bug_data = bug_prepare_db( $p_bug_data ); --- > $c_bug_data = clone $p_bug_data; > $c_bug_data = bug_prepare_db( $c_bug_data ); | ||||
This issue is incredibly unhelpful as it also affects the Description field. Every time the field contains quotes and the issue is updated (not the description), the description is marked as changed. Of course, the description changes aren't shown so it's impossible to know what / if anything has changed. |
|
Are you using the latest CVS snapshot? |
|
Yes, I checked Mantis out of CVS 5 minutes ago and I'm still having the same problem. Extra info:
edited on: 11-03-04 06:09 |
|
What is the string in the field that is causing the issue? Better question, what browser are you using? I can't reproduce this with php 4.3.8, I'm guessing this might be something to do with that. The other settings you mentioned are the same on my system. edited on: 11-03-04 06:20 |
|
In the summary field: In the description field: ========= Both fields get marked as updated. Browser is FireFox 0.10.1 (ver 1.0 Preview Release). I've restarted Apache with magic_quotes_gpc = Off and still have the same problem. edited on: 11-03-04 06:16 |
|
Reminder sent to thraxisp I think this is an issue with php, you said you couldn't reproduce it either, what version of php were you testing this issue on? edited on: 11-03-04 06:24 |
|
Give me a couple of days to upgrade and mess with this... I can't do too much untill I can actually replicate the issue. None of the test data is an issue on my system here... edited on: 11-03-04 06:44 |
|
I've found the problem but not created a solution yet. The following line of code not only returns the "fixed" bug data object, it somehow also replaces $p_bug_data with the fixed version. I see no reason why it is doing this. Line 698 of bug_api.php: I have also tried the putting $p_bug_data into a temporary variable before this line, but after the bug_prepare_db() function this temporary variable is also changed! I can only assume this is a bug or strange behaviour of PHP 5. Edit: |
|
There appears to be a difference in how php5 handles parameters implicitly passed by reference. In this case, it passes by reference instead of the php4 pass by value. My suggestion would be to fix bug_prepare_db to leave the original value alone. |
|
fixed in CVS. |
|