Skip to content

Commit 9862743

Browse files
committed
Merge pull request #4 from salaros/master
fixed #1 - Options, features and callbacks are not initialized if set to 'false'
2 parents b173fd9 + bb15c38 commit 9862743

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DataTable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ protected function getFeatures()
293293
];
294294
$result = [];
295295
foreach ($features as $attribute) {
296-
if (!empty($this->$attribute)) {
296+
if ($this->$attribute !== null) {
297297
$result[$attribute] = $this->$attribute;
298298
}
299299
}
@@ -327,7 +327,7 @@ protected function getOptions()
327327
];
328328
$result = [];
329329
foreach ($options as $attribute) {
330-
if (!empty($this->$attribute)) {
330+
if ($this->$attribute !== null) {
331331
$result[$attribute] = $this->$attribute;
332332
}
333333
}
@@ -354,7 +354,7 @@ protected function getCallbacks()
354354
];
355355
$results = [];
356356
foreach ($callbacks as $attribute) {
357-
if (!empty($this->$attribute)) {
357+
if ($this->$attribute !== null) {
358358
$results[$attribute] = new JsExpression($this->$attribute);
359359
}
360360
}
@@ -382,4 +382,4 @@ protected function initColumns()
382382
}
383383
}
384384

385-
}
385+
}

0 commit comments

Comments
 (0)