Skip to content

Commit

Permalink
fix: clarify that we want to check for a non-empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Jun 28, 2017
1 parent 5260faa commit d159e0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listener/ViewListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ protected function _associations(array $whitelist = [])
$associations = $table->associations();

$keys = $associations->keys();
if ($whitelist) {
if (!empty($whitelist)) {
$keys = array_intersect($keys, array_map('strtolower', $whitelist));
}
foreach ($keys as $associationName) {
Expand Down

0 comments on commit d159e0f

Please sign in to comment.