View Issue Details

IDProjectCategoryView StatusLast Update
0024355mantisbtbugtrackerpublic2018-04-29 19:21
ReporterdiwiAssigned 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

Issue History

Date Modified Username Field Change
2018-04-25 02:40 diwi New Issue
2018-04-25 03:37 atrol Assigned To => atrol
2018-04-25 03:37 atrol Status new => assigned
2018-04-25 03:37 atrol Target Version => 2.13.2
2018-04-25 03:41 atrol Note Added: 0059676
2018-04-25 03:59 atrol Note Added: 0059677
2018-04-27 09:59 atrol Changeset attached => MantisBT master-2.13 e92176ef
2018-04-27 09:59 atrol Status assigned => resolved
2018-04-27 09:59 atrol Resolution open => fixed
2018-04-27 09:59 atrol Fixed in Version => 2.13.2
2018-04-29 19:21 vboctor Status resolved => closed