-
Notifications
You must be signed in to change notification settings - Fork 285
New install - 500 Error: Invalid argument supplied for foreach() #574
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
Comments
Hi @james-siteclick, thanks for reporting this issue and following our guidelines. I need to try to reproduce your issue, I'm a bit busy today, so I'll probably check it out Monday, sorry for the delay. In the meantime, please verify your user and try to create an LRS again. |
Hi @james-siteclick, can you please clear your "app/storage/logs/laravel.log" file, then reproduce the issue and paste the contents of your "app/storage/logs/laravel.log" file here. |
Hi @ryansmith94 thanks for your help. I cleared everything and tried again, here's the log output: [2015-04-09 08:46:39] local.ERROR: exception 'ErrorException' with message 'Invalid argument supplied for foreach()' in /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:424 |
Thanks for that, I think I've found a fix 👍 |
Hi @james-siteclick, this should be fixed in the issue/574 branch. If you can pull and test that branch that would be helpful. Once you confirm that the issue is fixed for you we'll merge the fix. |
Hello @ryansmith94, I have the same problem than @james-siteclick. I tried you fix but I still have the problem with this log : [2015-04-10 13:43:06] local.INFO: Pretending to mail message to: [email protected] [] [] (I'm on Xunbuntu 14.04.02) |
Hi @Lupei. Can you please copy and paste lines 62 to 64 from "app/locker/data/dashboards/AdminDashboard.php"? |
Hi @ryansmith94, there it is : public function actorCount(){ |
Hi @ryansmith94, you pointed me here from the Google Forum, I'm facing the same issue, running from a Ubuntu cloud server on AWS. The issue is persisting after following your advice from there. Please let me know if there's anything I can do or if there are any log files you'd like to see that might be useful. Cheers! |
@Lupei that isn't using the fix I mentioned. I know this because the line that you pasted has been changed by my fix. @SamGreen9 thanks Sam, I believe this issue is fixed, however the fix is not yet released. This fix will go out this Friday with out weekly release (v1.3.10). Sorry for any inconvenience. In the meantime I can assist you if the password change is urgent. |
@ryansmith94 You're right, thanks. It works now ! |
Brilliant! No worries. Thank you for testing it @Lupei 😄 |
@ryansmith94 My apologies, after checking my line 63 I realised that I'd reinstalled using 'composer create-project', but this didn't include the latest fix. Installing your fix now, thanks! |
@SamGreen9 awesome no worries! 👍 |
1.3.8
Steps to reproduce the bug
Expected behaviour
Go to dashboard and create first LRS
Actual behaviour
Status: 500 Error: Invalid argument supplied for foreach()
Whoops, looks like something went wrong.
Stack trace:
#0 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(424): Illuminate\Exception\Handler->handleError(2, 'Invalid argumen...', '/Applications/M...', 424, Array)
#1 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(151): Illuminate\Database\Eloquent\Builder->getModels(Array)
#2 /Applications/MAMP/htdocs/learninglocker/app/locker/data/dashboards/AdminDashboard.php(63): Illuminate\Database\Eloquent\Builder->get()
#3 /Applications/MAMP/htdocs/learninglocker/app/locker/data/dashboards/AdminDashboard.php(24): app\locker\data\dashboards\AdminDashboard->actorCount()
#4 /Applications/MAMP/htdocs/learninglocker/app/routes.php(26): app\locker\data\dashboards\AdminDashboard->getFullStats()
#5 [internal function]: {closure}()
#6 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
#7 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1028): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#8 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#9 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(776): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#10 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(746): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#11 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#12 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#13 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#14 /Applications/MAMP/htdocs/learninglocker/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#15 /Applications/MAMP/htdocs/learninglocker/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(642): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#16 /Applications/MAMP/htdocs/learninglocker/public/index.php(49): Illuminate\Foundation\Application->run()
#17 {main} [] []
User has been created in Mongo:
{
'_id': ObjectId("551d3fb98f437e27a10041a7"),
'name': 'James xxx',
'email': 'xxx',
'verified': 'no',
'role': 'super',
'password': 'xxx',
'updated_at': ISODate("2015-04-02T13:10:17.585Z"),
'created_at': ISODate("2015-04-02T13:10:17.585Z")
}
Server information
OSX
MAMP
mongodb
Client information
OS: OSX
Browser: Chrome (latest)
Additional information
The text was updated successfully, but these errors were encountered: