The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
hasPerm - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: hasPerm (/showthread.php?tid=581)



hasPerm - Brandin - 06-03-2017

Hello,

Today is the first time I've tried to use hasPerm, and it didn't turn out well. I am wondering if maybe there is something wrong, here is the error:
Notice: Undefined variable: master_account in /home/aircentralized/public_html/templates/users/helpers/us_helpers.php on line 788

Warning: in_array() expects parameter 2 to be array, null given in /home/aircentralized/public_html/templates/users/helpers/us_helpers.php on line 788

Thank you.


hasPerm - karsen - 06-03-2017

It looks like $master_array needs to be declared as a global, like $user is at the start of the function. I can't test it because I've replaced the permissions with my own system, but let me know if that doesn't fix it!


hasPerm - mudmin - 06-06-2017

Yeah. There was an update that asked you to add it to your init.php. I don't remember which one.


hasPerm - Brandin - 06-06-2017

I'll have to dig through and find it - I must have missed that.