Skip to content

Commit f3b1113

Browse files
committed
fix callback check on empty values
This bug prevented giving an empty array as values.
1 parent 0d7e584 commit f3b1113

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Html/Builder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ public function parameterize($attributes = [])
161161
*/
162162
protected function isCallbackFunction($value, $key)
163163
{
164+
if (empty($value)) {
165+
return false;
166+
}
167+
164168
return Str::startsWith(trim($value), $this->config->get('datatables-html.callback', ['$', '$.', 'function'])) || Str::contains($key, 'editor');
165169
}
166170

0 commit comments

Comments
 (0)