Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #34 from bgmgmbh/master
Browse files Browse the repository at this point in the history
[BUGFIX] fix count parameter initialization for PHP 7.2
  • Loading branch information
7elix authored May 7, 2019
2 parents b149bfe + 5bacd58 commit d465f21
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Classes/View/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,12 @@ public function fillFileMarkers(&$markers)
$maxCount = $fieldSettings['errorCheck.'][$key . '.']['maxCount'];
$markers['###' . $replacedFieldname . '_maxCount###'] = $maxCount;

$fileCount = count($sessionFiles[$replacedFieldname]);
if (is_array($sessionFiles[$replacedFieldname])) {
$fileCount = count($sessionFiles[$replacedFieldname]);
}
else {
$fileCount = 0;
}
$markers['###' . $replacedFieldname . '_fileCount###'] = $fileCount;

$remaining = $maxCount - $fileCount;
Expand Down

0 comments on commit d465f21

Please sign in to comment.