berlindb / core

All of the required core code
MIT License
253 stars 27 forks source link

Query::get_results() column validation doesn't correctly check column names #31

Closed ashleyfae closed 4 years ago

ashleyfae commented 4 years ago

$column_names returns an array, where the column name is the key.

https://github.com/berlindb/core/blob/master/query.php#L2795

But then the column validation checks in_array(), when it should actually be checking array_key_exists()

https://github.com/berlindb/core/blob/master/query.php#L2797-L2802

ashleyfae commented 4 years ago

PR: #32