Menu

#31 Undefined variable permA

1.12
closed
None
2017-08-08
2017-07-17
Bret Watson
No

Get "PHP Notice: Undefined variable: permA in /var/www/html/userprofiles/viewuserprofile.php on line 116" when listing user profiles

Discussion

  • Luis, Wang

    Luis, Wang - 2017-07-17

    Find the "Error handling and logging" section in the php.ini.
    set the display_errors to Off to hide the notic on your website
    and restart your web server

     
  • Bret Watson

    Bret Watson - 2017-07-17

    umm.. no, we need to find the coding error and fix it... not hide it ! :)
    Anyway this is data from my logs...

     
  • Bret Watson

    Bret Watson - 2017-07-17

    But trying to get my head around teh code... it looks like in edituserprofile you do -
    foreach (array('Read','Write','Edit','Admin') as $p) {
    echo '<input type="hidden" name="perm&lt;span&gt;[' . $pi . ']&lt;/span&gt;" value="' . $func . '|' . $p . '">';
    $permA[$func][$p] = $pi++;
    }
    before using $permA

    whilst in viewuserprofile you  just try and use it without putting anything in $permA first?
    
     
  • Luis, Wang

    Luis, Wang - 2017-08-08
    • status: open --> closed
    • assigned_to: Luis, Wang
    • Milestone: 1.4 --> 1.12
     

Log in to post a comment.