Skip to content

ImageType is not working #15

@ghost

Description

I have defined a field as ImageType this way (as documentation says):

->add('imagefile', 'formextra_image', array(
'base_path' => DIR.'/../../../../web/uploads/user_images/',
'base_uri' => '/uploads/user_images/',
'no_image_placeholder_uri' => '/img/noimage.png'

And it displays this error:

Fatal error: Call to a member function getPath() on a non-object in /Applications/MAMP/htdocs/myproject/vendor/bundles/SimpleThings/FormExtraBundle/Form/Type/ImageType.php on line 57

I have echoed the $data variable (the one throwing the error) and it contains just the value of the field, it's a string variable, but in the code is treated as an object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions