View Issue Details

IDProjectCategoryView StatusLast Update
0004787mantisbtbugtrackerpublic2005-04-18 10:34
ReporterThox Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit trunk 
Fixed in Version1.0.0a1 
Summary0004787: 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\'

TagsNo 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 );
patch.diff (159 bytes)   

Relationships

duplicate of 0004404 closedDGtlRift Issue history summary slashes 
related to 0004699 closedjlatour Reporting bug doesn not work with "word style" quotation marks 
child of 0004937 closedvboctor Mantis 1.0.0a1 Release 

Activities

Thox

Thox

2004-11-03 03:36

reporter   ~0008232

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.

DGtlRift

DGtlRift

2004-11-03 05:58

reporter   ~0008233

Are you using the latest CVS snapshot?

Thox

Thox

2004-11-03 06:05

reporter   ~0008234

Last edited: 2004-11-03 06:09

Yes, I checked Mantis out of CVS 5 minutes ago and I'm still having the same problem.

Extra info:

  • PHP 5.0.1
  • register_globals = Off
  • magic_quotes_gpc = On
  • magic_quotes_runtime = Off

edited on: 11-03-04 06:09

DGtlRift

DGtlRift

2004-11-03 06:10

reporter   ~0008235

Last edited: 2004-11-03 06:20

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

Thox

Thox

2004-11-03 06:14

reporter   ~0008236

Last edited: 2004-11-03 06:16

In the summary field:
Email queue reports failures because of 'null' in sentemail columns

In the description field:
Specifically To_NV.
We should check that To is not null.
Detected on 66. See attached jpeg which is the result of "select top 30 * from sentemail_t WHERE to_nv = 'null' order by unique_id desc"

=========

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

DGtlRift

DGtlRift

2004-11-03 06:23

reporter   ~0008237

Last edited: 2004-11-03 06:24

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

DGtlRift

DGtlRift

2004-11-03 06:37

reporter   ~0008239

Last edited: 2004-11-03 06:44

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

Thox

Thox

2004-11-23 04:03

reporter   ~0008409

Last edited: 2004-11-23 04:25

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:
$c_bug_data = bug_prepare_db( $p_bug_data );

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:
Temporary solution found on PHP.net website. Attached patch for PHP 5 only.

thraxisp

thraxisp

2004-12-22 19:09

reporter   ~0008772

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.

thraxisp

thraxisp

2004-12-22 20:30

reporter   ~0008774

fixed in CVS.