8000 Fixed undefined ImageValidator::$suffices property when uploading an image during functional tests by OwlyCode · Pull Request #11111 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fixed undefined ImageValidator::$suffices property when uploading an image during functional tests #11111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Made FileValidator::$suffices private again
  • Loading branch information
OwlyCode committed Jun 12, 2014
commit 191c6f700e78ea9400732efa3dffd851beae4fa1
4 changes: 2 additions & 2 deletions src/Symfony/Component/Validator/Constraints/FileValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FileValidator extends ConstraintValidator

const MB_BYTES = 1000000;

protected static $suffices = array(
private static $suffices = array(
1 => 'bytes',
self::KB_BYTES => 'kB',
self::MB_BYTES => 'MB',
Expand Down Expand Up @@ -160,7 +160,7 @@ public function validate($value, Constraint $constraint)
$this->context->addViolation($constraint->maxSizeMessage, array(
'{{ size }}' => $sizeAsString,
'{{ limit }}' => $limitAsString,
'{{ suffix }}' => static::$suffices[$coef],
'{{ suffix }}' => self::$suffices[$coef],
'{{ file }}' => $path,
));

Expand Down
0