View Issue Details

IDProjectCategoryView StatusLast Update
0012547mantisbtattachmentspublic2011-04-05 14:23
ReporterSL-Gundam Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPHP 5.3.3 ntsOSWindows 7 x64OS Version6.1 (Build 7600)
Product Version1.2.3 
Target Version1.2.5Fixed in Version1.2.5 
Summary0012547: Error when file upload fails is incorrect
Description

When a file upload fails in disk or ftp mode the trigger_error calls FILE_MOVE_FAILED. This should have been ERROR_FILE_MOVE_FAILED

patch for the 1.2.x branch attached to this issue

Tagspatch
Attached Files
0001-FILE_MOVE_FAILED-changed-to-ERROR_FILE_MOVE_FAILED.patch (1,362 bytes)   
From f8c2b09145326808223b154884209780baf18c42 Mon Sep 17 00:00:00 2001
From: SL-Gundam <slgundam@gmail.com>
Date: Sat, 20 Nov 2010 19:40:56 +0100
Subject: [PATCH] FILE_MOVE_FAILED changed to ERROR_FILE_MOVE_FAILED

Signed-off-by: SL-Gundam <slgundam@gmail.com>
---
 core/file_api.php   |    2 +-
 proj_doc_update.php |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/file_api.php b/core/file_api.php
index 3c61769..ff81248 100644
--- a/core/file_api.php
+++ b/core/file_api.php
@@ -690,7 +690,7 @@ function file_add( $p_bug_id, $p_file, $p_table = 'bug', $p_title = '', $p_desc
 				}
 
 				if( !move_uploaded_file( $t_tmp_file, $t_disk_file_name ) ) {
-					trigger_error( FILE_MOVE_FAILED, ERROR );
+					trigger_error( ERROR_FILE_MOVE_FAILED, ERROR );
 				}
 
 				chmod( $t_disk_file_name, config_get( 'attachments_file_permissions' ) );
diff --git a/proj_doc_update.php b/proj_doc_update.php
index e092588..29f2cf0 100644
--- a/proj_doc_update.php
+++ b/proj_doc_update.php
@@ -95,7 +95,7 @@
 					file_delete_local( $t_disk_file_name );
 				}
 				if ( !move_uploaded_file( $v_tmp_name, $t_disk_file_name ) ) {
-					trigger_error( FILE_MOVE_FAILED, ERROR );
+					trigger_error( ERROR_FILE_MOVE_FAILED, ERROR );
 				}
 				chmod( $t_disk_file_name, config_get( 'attachments_file_permissions' ) );
 
-- 
1.7.3.1.msysgit.0

Activities

dhx

dhx

2010-12-25 01:36

reporter   ~0027692

Thanks, I've committed your patch.

Related Changesets

MantisBT: master a957378e

2010-11-20 13:40

SL-Gundam

Committer: dhx


Details Diff
Fix 0012547: FILE_MOVE_FAILED changed to ERROR_FILE_MOVE_FAILED

There were some incorrect references to error constants that didn't
exist. They must be prefixed with ERROR_.

Signed-off-by: SL-Gundam <slgundam@gmail.com>
Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012547
mod - core/file_api.php Diff File
mod - proj_doc_update.php Diff File

MantisBT: master-1.2.x 650b8358

2010-11-20 13:40

SL-Gundam

Committer: dhx


Details Diff
Fix 0012547: FILE_MOVE_FAILED changed to ERROR_FILE_MOVE_FAILED

There were some incorrect references to error constants that didn't
exist. They must be prefixed with ERROR_.

Signed-off-by: SL-Gundam <slgundam@gmail.com>
Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012547
mod - proj_doc_update.php Diff File
mod - core/file_api.php Diff File