ualibraries / Guide-on-the-Side

The University of Arizona Libraries will no longer provide support for Guide on the Side. The code will remain openly available; however, UAL can no longer provide code fixes or upgrades.
https://ualibraries.github.io/Guide-on-the-Side/about.html
Other
66 stars 48 forks source link

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

Open pbhenson opened 6 years ago

pbhenson commented 6 years ago

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.