View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008810CDashpublic2009-03-28 07:432009-03-28 15:05
ReporterR Wackerbarth 
Assigned ToJulien Jomier 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.4 
Summary0008810: When Editing a project, createProject.php get an error calling fopen.
DescriptionUnless 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.
Additional Information===================================================================
--- 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)
     {
===================================================================
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0015832)
Julien Jomier (manager)
2009-03-28 15:05

Fixed in CDash 1.4. Thanks for the report.

 Issue History
Date Modified Username Field Change
2009-03-28 07:43 R Wackerbarth New Issue
2009-03-28 14:40 Julien Jomier Status new => assigned
2009-03-28 14:40 Julien Jomier Assigned To => Julien Jomier
2009-03-28 15:05 Julien Jomier Note Added: 0015832
2009-03-28 15:05 Julien Jomier Status assigned => closed
2009-03-28 15:05 Julien Jomier Resolution open => fixed
2009-03-28 15:05 Julien Jomier Fixed in Version => 1.4


Copyright © 2000 - 2018 MantisBT Team