illegal string offset
Posted: 2016-04-06 04:35
Trying to set filters for users while maintaining visibility of all information for admins. Maybe I am combining things that I shouldn't, but from the help I came up with the following to apply a filter so long as the logged in user was not a member of the 'Admins' group (added to the 'tablename_init.php' file in the /hooks/ folder:
While it seems to work, when inspecting the code in the browser console I see the following error:
Should I be worried about this error? It doesn't seem to affect functionality but on some mobile browsers I see portions of the error displayed on the page itself.
Code: Select all
function moistures_init(&$options, $memberInfo, &$args){
/*
Added memberInfo[group] to filter out admins
*/
if(!$_POST['FilterField'][1] && !$_GET['FilterField'][1] && !$memberInfo['group']['Admins']){
...rest of code for filters
Code: Select all
: Illegal string offset 'Admins' in .../hooks/tanker_monitor.php on line 32