Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nicolefdeguzman opened this issue May 26, 2017 · 4 comments
Open

Comments

@nicolefdeguzman
Copy link

nicolefdeguzman commented May 26, 2017

No description provided.

@nicolefdeguzman
Copy link
Author

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

@nicolefdeguzman
Copy link
Author

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;
    

    }

    /**

@mrkoch
Copy link

mrkoch commented Oct 16, 2017

Same problem here, no news on this issue?

@philippfrenzel
Copy link

same problem here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants