MantisBT - CDash
View Issue Details
0011491CDash(No Category)public2010-11-22 03:082010-11-22 10:25
Michal Cihar 
Zach Mullen 
normalminoralways
resolvedfixed 
 
 
0011491: Double fclose in asynchronous submission
On asynchronous submission, I get following warning:

PHP Warning: fclose(): 67 is not a valid stream resource in /srv/https/cdash.cihar.com/cdash/processsubmissions.php on line 387

The problem is that do_submit which is called just before this line closes the file as well, so this line can be safely removed.
No tags attached.
Issue History
2010-11-22 03:08Michal CiharNew Issue
2010-11-22 03:11Julien JomierAssigned To => Zach Mullen
2010-11-22 03:11Julien JomierStatusnew => assigned
2010-11-22 09:46David ColeNote Added: 0023480
2010-11-22 10:25Zach MullenNote Added: 0023481
2010-11-22 10:25Zach MullenStatusassigned => resolved
2010-11-22 10:25Zach MullenResolutionopen => fixed

Notes
(0023480)
David Cole   
2010-11-22 09:46   
I disagree.

Whoever calls fopen should also call fclose.

Do not remove the call in processsubmissions.php. Remove the one in do_submit, and make sure all callers of do_submit are doing fopen/fclose as appropriate.

do_submit should not be calling fclose: what if it is handed a file stream that is not meant to be fclose-d...?
(0023481)
Zach Mullen   
2010-11-22 10:25   
Implemented the fix as Dave suggested.

Rev. 2794