View Issue Details

IDProjectCategoryView StatusLast Update
0017322mantisbtattachmentspublic2014-12-05 18:33
ReporterTealk Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.17 
Target Version1.2.18Fixed in Version1.2.18 
Summary0017322: Warning in bug report when attachments are disabled
Description

If i Report a Bug i get this error:
SYSTEM WARNING: 'Invalid argument supplied for foreach()' in '/var/www/web120088/html/BUG/bug_report.php' line 151- craft.HAY_BLOCK

The Report is running fine but i get this error all times

Steps To Reproduce

http://bug.anzahcraft.de
Report a Bug

TagsNo tags attached.

Relationships

parent of 0017324 closeddregad Debug output displayed when adding files 
related to 0017325 closeddregad helper_array_transpose should always return an array 

Activities

dregad

dregad

2014-05-12 04:17

developer   ~0040257

I managed to reproduce the problem on a fresh install of MantisBT 1.2.x, after removing 'attachments' from $g_bug_report_page_fields.

In that case 'ufile' is not set, so $t_files becomes NULL (bug_report.php line 150) causing the warning in the foreach.

dregad

dregad

2014-05-12 06:21

developer   ~0040259

BTW you can squelch the error by setting $g_display_errors[E_WARNING] = DISPLAY_ERROR_NONE;

Tealk

Tealk

2014-05-12 11:41

reporter   ~0040267

i havent remove anything from $g_bug_report_page_fields i have only set up $g_allow_file_upload = OFF;

Related Changesets

MantisBT: master-1.2.x 604042b9

2014-05-12 00:18

dregad


Details Diff
bug_report.php: fix warning when not using attachments

When attachments are not used, 'ufile' is not defined, so $t_files
becomes NULL (line 150) causing the 'Invalid argument supplied for
foreach' warning.

Fixes 0017322
Affected Issues
0017322
mod - bug_report.php Diff File

MantisBT: master 53d06416

2014-05-12 00:18

dregad


Details Diff
bug_report.php: fix warning when not using attachments

When attachments are not used, 'ufile' is not defined, so $t_files
becomes NULL (line 150) causing the 'Invalid argument supplied for
foreach' warning.

Fixes 0017322
Affected Issues
0017322
mod - bug_report.php Diff File

MantisBT: master-1.2.x 8b2d05da

2014-05-12 02:08

dregad


Details Diff
Issue 0017322: apply same logic in bug_file_add.php Affected Issues
0017322
mod - bug_file_add.php Diff File

MantisBT: master fd2608dd

2014-05-12 02:08

dregad


Details Diff
Issue 0017322: apply same logic in bug_file_add.php Affected Issues
0017322
mod - bug_file_add.php Diff File