Im trying to finish up this slim boilerplate repo. But for some reasons I’m getting two (2) errors that i can’t really figure out how to solve. Oddly enough it doesn’t effect MAMP more then giving two lines of errors. But ofc when running php -S 0.0.0.0:8888t public public/index.php I get error feedback in browser.
[01-Jun-2016 22:01:33 Europe/Stockholm] PHP Notice: Undefined index: user in /htdocs/slim3/app/Auth/Auth.php on line 11
[01-Jun-2016 22:01:33 Europe/Stockholm] PHP Notice: Undefined index: errors in /htdocs/slim3/app/Middleware/ValidationErrorsMiddleware.php on line 9
Just a guess here, but the errors reported would seem to indicate that you have a problem with your $_SESSION (or the data that you put (or rather, don’t put)) into it. Are you sure your $_SESSION is properly initialized and handled?
But yes, accessing those $_SESSION variables should probably be placed in a isset() check.