MantisBT - CDash
View Issue Details
0008810CDashpublic2009-03-28 07:432009-03-28 15:05
R Wackerbarth 
Julien Jomier 
normalminoralways
closedfixed 
 
1.4 
0008810: When Editing a project, createProject.php get an error calling fopen.
Unless you specify a Logo file, fopen() fails at line 329 because CDash no longer uses a file in the file system to store the project logo.

The correction is to test to see if a file was specified before attempting to fopen() the file and examine its contents. If no file is specified, the correct action is to "do nothing" with respect to the project logo.

Patch attached.
===================================================================
--- createProject.php (revision 1599)
+++ createProject.php (working copy)
@@ -326,7 +326,11 @@
 
   $imgid = qnum($project_array["imageid"]);
   
- $handle = fopen($_FILES['logo']['tmp_name'],"r");
+ $handle = 0;
+ if($_FILES['logo']['size'])
+ {
+ $handle = fopen($_FILES['logo']['tmp_name'],"r");
+ }
   $contents = 0;
   if($handle)
     {
===================================================================
No tags attached.
Issue History
2009-03-28 07:43R WackerbarthNew Issue
2009-03-28 14:40Julien JomierStatusnew => assigned
2009-03-28 14:40Julien JomierAssigned To => Julien Jomier
2009-03-28 15:05Julien JomierNote Added: 0015832
2009-03-28 15:05Julien JomierStatusassigned => closed
2009-03-28 15:05Julien JomierResolutionopen => fixed
2009-03-28 15:05Julien JomierFixed in Version => 1.4

Notes
(0015832)
Julien Jomier   
2009-03-28 15:05   
Fixed in CDash 1.4. Thanks for the report.