1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Banning a moderator leads to error

Discussion in 'Resolved Bug Reports' started by Astrum, Apr 4, 2011.

  1. Astrum

    Astrum Active Member

    I came across this inadvertently and was a bit confused at first. I was trying to ban a test user to see the process and I got an error. Here's the details from the log:

    Error Info
    ErrorException: Illegal offset type in isset or empty - library/XenForo/Phrase.php:288
    Generated By: Astrum, 13 minutes ago
    Stack Trace
    #0 /Applications/MAMP/htdocs/xenforo_test/library/XenForo/Phrase.php(288): XenForo_Application::handlePhpError(2, 'Illegal offset ...', '/Applications/M...', 288, Array)
    #1 /Applications/MAMP/htdocs/xenforo_test/library/XenForo/Phrase.php(91): XenForo_Phrase::preloadPhrase(Object(XenForo_Phrase))
    #2 /Applications/MAMP/htdocs/xenforo_test/library/XenForo/ControllerAdmin/Banning.php(138): XenForo_Phrase->__construct(Object(XenForo_Phrase))
    #3 /Applications/MAMP/htdocs/xenforo_test/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Banning->actionUsersSave()
    #4 /Applications/MAMP/htdocs/xenforo_test/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #5 /Applications/MAMP/htdocs/xenforo_test/admin.php(13): XenForo_FrontController->run()
    #6 {main}
    Request State
    array(3) {
      ["url"] => string(60) "http://localhost/xenforo_test/admin.php?banning/users/0/save"
      ["_GET"] => array(1) {
        ["banning/users/0/save"] => string(0) ""
      ["_POST"] => array(4) {
        ["username"] => string(4) "Test"
        ["ban_length"] => string(9) "permanent"
        ["user_reason"] => string(0) ""
        ["_xfToken"] => string(53) "1,1301925659,f869b58659772e6a5fe01e9d8da343379a6c6af7"
    As it turns out I had set this user to be a moderator of a particular forum to test the reported items and moderation queues. Once I removed him from being a moderator the error message went away and I could ban him just fine.

    Sorry if this has already been posted, I did a search but didn't find anything.

    Edit - I'd also like to say that even though this is my testbed for development and I do a lot of spelunking I also tried this on my production forum which is free of any add-ons at the moment and is only using the Flexile theme. Otherwise it's a stock install.
  2. Mike

    Mike XenForo Developer Staff Member

    Fixed locally now.

Share This Page