Skip to content

Commit

Permalink
Merge pull request #356 from arneruy/issue_353
Browse files Browse the repository at this point in the history
[GeneratorBundle] Fix error when generating pagepart with images
  • Loading branch information
Roderik van der Veer committed Apr 22, 2015
2 parents d57a0c3 + f83965b commit f8a891e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function ($name) use ($fields, $self, $bundle, $generator, $container) {
'mimeTypes' => $mimeTypes,
);

if ($typeStrings [$typeId] == 'image') {
if ($extra == 'image') {

// Ask the minimum height allowed for the image
$lengthValidation = function ($length) {
Expand All @@ -526,7 +526,7 @@ function ($name) use ($fields, $self, $bundle, $generator, $container) {
//Ask the maximum width allowed for the image
$maxWidth = $this->assistant->askAndValidate('What is the maximum width for the media object? (in pixels)', $lengthValidation);

$data = array('name' => $fieldName, 'type' => $typeStrings[$typeId], 'extra' => $extra,
$data = array('name' => $fieldName, 'type' => 'image', 'extra' => $extra,
'minHeight' => $minHeight, 'maxHeight' => $maxHeight, 'minWidth' => $minWidth, 'maxWidth' => $maxWidth, 'mimeTypes' => $mimeTypes);
}

Expand Down

0 comments on commit f8a891e

Please # to comment.