summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2019-08-10 12:00:06 +1000
committerBenjamin Southall <applemansigloo@gmail.com>2019-08-10 12:00:06 +1000
commitc8d609ecf15eee27ad393f6d711ead87b99a04c7 (patch)
treee4706e0cddb7e54046375cb267642db8220687e4
parentb6e143975571675d071afd75fbfbd673c9b01bb7 (diff)
Fixes count(): Parameter must be an array or an object that implements Countable #158 by replacing count with existence check for var,name and then using length
-rw-r--r--templates/mod/config-editor.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html
index 411d55e6..ebf4202b 100644
--- a/templates/mod/config-editor.html
+++ b/templates/mod/config-editor.html
@@ -23,7 +23,7 @@
<th>{% trans 'Description' %}</th>
</tr>
{% for var in conf if var.type != 'array' %}
- {% if var.name|count == 1 %}
+ {% if var.name and var.name|length == 1 %}
{% set name = 'cf_' ~ var.name %}
{% else %}
{% set name = 'cf_' ~ var.name|join('/') %}
@@ -31,7 +31,7 @@
<tr>
<th class="minimal">
- {% if var.name|count == 1 %}
+ {% if var.name and var.name|length == 1 %}
{{ var.name }}
{% else %}
{{ var.name|join(' &rarr; ') }}