Check that the variable $thisPermissions contain an array and that it
is not empty!
pr($thisPermissions)

Maybe you don't need the line:
$thisPermissions = $thisPermissions['Permission'];

Enjoy,
   John

On Nov 6, 12:03 am, damanlovett <ed...@lovettcreations.org> wrote:
> I'm using the tutorial CakePHP Auth Component - Users, Groups &
> Permissions Revisited
>
> The error I'm getting is
>
> Warning (2): Invalid argument supplied for foreach() [APP/
> app_controller.php, line 98]
>
> The code for the line error is
>
>                 $thisPermissions = $thisPermissions['Permission'];
>                 foreach($thisPermissions as $thisPermission){
>                     $permissions[]=$thisPermission['name'];
>                 }
>
> Which seems like no information is being passed to the loop.
>
> Can any one help me figure out why information isn't being passed to
> the loop?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to