CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

array_slice() expects parameter 1 to be array, object given #62

Open nicolefdeguzman opened 7 years ago

nicolefdeguzman commented 7 years ago

I can't display the attachments because of this error.

nicolefdeguzman commented 7 years ago

PHP Warning – yii\base\ErrorException

array_slice() expects parameter 1 to be array, object given

  1. in /app/vendor/yiisoft/yii2/data/ArrayDataProvider.php at line 96 87888990919293949596979899100101102103104105 }

    if (($pagination = $this->getPagination()) !== false) {
        $pagination->totalCount = $this->getTotalCount();
    
        if ($pagination->getPageSize() > 0) {
    
            $models = array_slice($models, $pagination->getOffset(), $pagination->getLimit(), true);
        }
    }
    
    return $models;

    }

    /**

    • @inheritdoc */
mrkoch commented 6 years ago

Same problem here, no news on this issue?

philippfrenzel commented 6 years ago

same problem here 👍