# InvalidArgumentException

**URL:** <https://discourse.cakephp.org/t/invalidargumentexception/9505>\
**Category:** Uncategorized\
**Tags:** help\
**Created:** [July 6, 2021, 10:13pm UTC](https://discourse.cakephp.org/t/invalidargumentexception/9505 "2021-07-06T22:13:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![D.Krimo](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@D.Krimo](https://discourse.cakephp.org/u/D.Krimo)\
**Post date:** [July 6, 2021, 10:13pm UTC](https://discourse.cakephp.org/t/invalidargumentexception/9505/1 "2021-07-06T22:13:20Z")

</div>

hi guys …  
I’m new in cakephp and i like it .(cool)  
as you have guessed i got error.  
this error

```auto
Invalid data type, must be an array or \ArrayAccess instance.
InvalidArgumentException

```

it’s seems like i do something wrong with the Controller or the Model?? or the AppController!!  
Generally what is the cause of this Exception.  
what is the site and situation

any help would be appreciated.  
Arigato

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [July 7, 2021, 1:51am UTC](https://discourse.cakephp.org/t/invalidargumentexception/9505/2 "2021-07-07T01:51:59Z")

</div>

Generally, this is caused by passing something that’s not an array or \ArrayAccess instance to a function that demands that the parameter be one of those types.

Specifically, we can’t say anything at all about this, as it might be you trying to call one of your own functions incorrectly. A stack trace would be very useful.
