Skip to content
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

PHP Notice: Undefined index: Role in AppController.php on line 36 #176

Open
pbhenson opened this issue Jan 11, 2018 · 0 comments
Open

PHP Notice: Undefined index: Role in AppController.php on line 36 #176

pbhenson opened this issue Jan 11, 2018 · 0 comments

Comments

@pbhenson
Copy link

We get a lot of these in our log files:

1: [:error] [pid 28452] [client 64.114.207.67:9798] PHP Notice:  Undefined i

ndex: Role in
/var/www/localhost/htdocs/guide_on_the_side/app/Controller/AppController.php on
line 36, referer:
http://gots.library.cpp.edu/guide_on_the_side/tutorial/document-delivery
1: [:error] [pid 92566] [client 64.114.207.67:15593] PHP Notice: Undefined
index: Role in
/var/www/localhost/htdocs/guide_on_the_side/app/Controller/AppController.php on
line 36, referer:
http://gots.library.cpp.edu/guide_on_the_side/tutorial/document-delivery
1: [:error] [pid 35701] [client 34.215.24.125:34610] PHP Notice: Undefined
index: Role in
/var/www/localhost/htdocs/guide_on_the_side/app/Controller/AppController.php on
line 36
1: [:error] [pid 5416] [client 64.114.207.67:16777] PHP Notice: Undefined i
ndex: Role in
/var/www/localhost/htdocs/guide_on_the_side/app/Controller/AppController.php on
line 36, referer:
http://gots.library.cpp.edu/guide_on_the_side/tutorial/document-delivery
1: [:error] [pid 5416] [client 34.215.24.125:34616] PHP Notice: Undefined i
ndex: Role in
/var/www/localhost/htdocs/guide_on_the_side/app/Controller/AppController.php on
line 36

Based on the code:

$role = $this->Role->findById($role_id);
$this->Session->write('Role', $role['Role']);

The role object does not have a 'Role' index? Is it assumed that it always should? We're running 1.0-beta4 which still seems to be the latest release version, and this section of code doesn't look different in HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant