Skip to content

Commit 8239500

Browse files
add a warning for callback and array with less than 2 items
1 parent cb6d65e commit 8239500

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

language-snippets.ent

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,11 @@ use.</simpara></note>'>
739739
<literal>0.99</literal> and <literal>0.1</literal> will both be cast to an
740740
integer value of <literal>0</literal>, which will compare such values as equal.
741741
</para>
742+
<para>
743+
The callback is not called if the input has less than 2 items,
744+
an error (e.g. accessing an invalid key of an array) or an exception
745+
will not be reported, unless you test it with 2 items or more.
746+
</para>
742747
</caution>'>
743748

744749
<!ENTITY sort.callback.description.presort '<caution xmlns="http://docbook.org/ns/docbook">

0 commit comments

Comments
 (0)