What about: `foreach ((array) $columns as $column)` instead of this `if` ?