rappasoft / vault

Roles & Permissions for the Laravel 5 Framework
MIT License
103 stars 10 forks source link

Invalid argument supplied for foreach() #14

Closed NeDetto closed 9 years ago

NeDetto commented 9 years ago

Hello,

I try to use this package and... it is good! very nice! i found i little problem when i'm in the "site.app:8000/access/users/create". I fill the fields and press "Save". The sistem create new user correctly, but then, i rest in the same page and i see this error "Invalid argument supplied for foreach()".

Can you help me?

Other information : the "version" of my installation is "Installing rappasoft/vault (dev-master 7bf215c)" (readed during "composer update" command)

rappasoft commented 9 years ago

Hmm weird you shouldn't, even if you don't choose a role it will create the user and deactivate them, then return you to the edit user page for that user. If then you don't see the user, check the deactivated section. The only thing it should be looping over during creation are the roles and permissions.

I've made a bunch of users and cant replicate your problem :(

NeDetto commented 9 years ago

Hello, this is my screenshot (see link 1 and link 2) Form step 1 Form step 2

If you want i have "debug bar". If you want i can insert some message near a "possible bug position". Tnx for reply :+1:

rappasoft commented 9 years ago

Hey there. Sorry I have been busy the last few days. I will try to debug this for you soon.

rappasoft commented 9 years ago

I can't replicate this issue. If you send me the project maybe I can debug it.

rappasoft commented 9 years ago

I'm gonna push a fix right now.