Skip to content

Commit 5922abc

Browse files
committed
Fix #1018
1 parent d39cfb9 commit 5922abc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/forms/element.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,11 @@ PHP_METHOD(Phalcon_Forms_Element, addFilter){
188188
} else {
189189
PHALCON_INIT_VAR(new_filters);
190190
array_init_size(new_filters, 2);
191-
phalcon_array_append(&new_filters, filters, PH_SEPARATE);
192-
phalcon_array_append(&new_filters, filter, PH_SEPARATE);
191+
if (Z_TYPE_P(filters) == IS_STRING) {
192+
phalcon_array_append(&new_filters, filters, 0);
193+
}
194+
195+
phalcon_array_append(&new_filters, filter, 0);
193196
phalcon_update_property_this(this_ptr, SL("_filters"), new_filters TSRMLS_CC);
194197
}
195198

0 commit comments

Comments
 (0)