mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Better checking TechnicalDataSet return type.
This commit is contained in:
@@ -110,8 +110,9 @@
|
||||
{% set dataW = constant('media_subdef::TC_DATA_WIDTH') %}
|
||||
{% set dataH = constant('media_subdef::TC_DATA_HEIGHT') %}
|
||||
|
||||
{% set width = record.get_technical_infos(dataW).value %}
|
||||
{% set height = record.get_technical_infos(dataH).value %}
|
||||
{% set technical_info = record.get_technical_infos %}
|
||||
{% set width = technical_info[dataW].value %}
|
||||
{% set height = technical_infos[dataH].value %}
|
||||
|
||||
{% if width and height %}
|
||||
{% set ratio = (width / height)|number_format(2, '.') %}
|
||||
|
Reference in New Issue
Block a user