Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 85470c5

Browse filesBrowse files
issamkhadiri1989javiereguiluz
authored andcommitted
Update create_form_type_extension.rst
Hello, I think the condition `image_url is not null` is not enough as if we create a FileType form field without the `image_property` it causes an error. Adding `image_url is defined` is necessary because the variable `image_url` is only defined and passed to the view when `image_property` is already defined.
1 parent afa51d3 commit 85470c5
Copy full SHA for 85470c5

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎form/create_form_type_extension.rst

Copy file name to clipboardExpand all lines: form/create_form_type_extension.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Specifically, you need to override the ``file_widget`` block:
192192

193193
{% block file_widget %}
194194
{{ block('form_widget') }}
195-
{% if image_url is not null %}
195+
{% if image_url is defined and image_url is not null %}
196196
<img src="{{ asset(image_url) }}"/>
197197
{% endif %}
198198
{% endblock %}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.