Skip to content

Commit

Permalink
Fixed Array to string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ASV93 committed Feb 3, 2022
1 parent cd214cd commit dcc47e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/File/Validation/AbstractLengthRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ protected function addValidationMethod(string $parameterName, $value): void
], AbstractModelFile::TYPE_STRING, PhpMethod::ACCESS_PUBLIC, false, true);
$itemName = sprintf('%s%sItem', lcfirst($this->getFile()->getModel()->getCleanName(false)), ucfirst($this->getAttribute()->getCleanName()));

if (is_array($value))
$value = $value[0];

$method
->addChild('$message = \'\';')
->addChild('$invalidValues = [];')
Expand Down

0 comments on commit dcc47e1

Please sign in to comment.