View Issue Details

IDProjectCategoryView StatusLast Update
0024355mantisbtbugtrackerpublic2018-04-29 19:21
Reporterdiwi Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.13.1 
Target Version2.13.2Fixed in Version2.13.2 
Summary0024355: SYSTEM WARNING 'count(): Parameter must be an array or an object that implements Countable' in 'IssueNoteAddCommand.php
Description

php 7.2
SYSTEM WARNING

'count(): Parameter must be an array or an object that implements Countable' in '/var/www/diwi.cz/mantis/core/commands/IssueNoteAddCommand.php' line 246

On line 246: if ( count( $this->files > 0 )) {
Should be: if ( count( $this->files ) > 0 ) {

Steps To Reproduce

When trying add note to issue

TagsNo tags attached.

Activities

atrol

atrol

2018-04-25 03:41

developer   ~0059676

Thanks for telling.

php 7.2

As a side note.
I expect a lot more PHP 7.2 related warnings and I recommend to use PHP 7.1 at the moment.
You should at least wait for 2.14.0, e.g. we updated ADOdb to 5.20.12 to fix some PHP 7.2 related issue, see 0024192

atrol

atrol

2018-04-25 03:59

developer   ~0059677

PR https://github.com/mantisbt/mantisbt/pull/1345

Related Changesets

MantisBT: master-2.13 e92176ef

2018-04-25 03:56:34

atrol

Details Diff
Correct attachment handling when adding notes

Fixing a SYSTEM WARNING on PHP 7.2
'count(): Parameter must be an array or an object that implements Countable'

Fixes 0024355
Affected Issues
0024355
mod - core/commands/IssueNoteAddCommand.php Diff File
mod - core/file_api.php Diff File