Skip to content

Commit ee0c13a

Browse files
committed
Small adjustment of #185
1 parent 53285c4 commit ee0c13a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ protected function addRelationColumns($columns,$select) {
15281528
}
15291529

15301530
protected function excludeFields($fields,$exclude) {
1531-
if ($fields) {
1531+
if ($fields && $exclude) {
15321532
$columns = explode(',',$exclude);
15331533
foreach($columns as $column) {
15341534
$table = "";
@@ -1651,7 +1651,7 @@ protected function getParameters($settings) {
16511651
list($tables,$collect,$select) = $this->findRelations($tables,$database,$auto_include);
16521652
$columns = $this->addRelationColumns($columns,$select);
16531653
$fields = $this->findFields($tables,$columns,$database);
1654-
if (isset($exclude)) $fields = $this->excludeFields($fields,$exclude);
1654+
$fields = $this->excludeFields($fields,$exclude);
16551655

16561656
// permissions
16571657
if ($table_authorizer) $this->applyTableAuthorizer($table_authorizer,$action,$database,$tables);

0 commit comments

Comments
 (0)