yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

fetchAll error while fetch return not array #27

Closed dkochnov closed 8 years ago

dkochnov commented 8 years ago

function fetchAll() if $this->fetch() return not array (as example - FETCH_COLUMN)

    $this->_results = array();
    while ($row = $this->fetch())
    {
        if (is_resource(reset($row))) {

then line with reset($row) throw Database Exception – yii\db\Exception reset() expects parameter 1 to be array, string given

yajra commented 8 years ago

@dkochnov, would you be able to submit a PR to fix this? I am using this package via Laravel and I think you are using Yii. It would be better if the fix would come from you? Thanks a lot!

dkochnov commented 8 years ago

of course, thank you https://github.com/yajra/pdo-via-oci8/pull/28

yajra commented 8 years ago

@dkochnov thanks a lot for the PR. Merged and released on v1.0.3 👍