Error when adding a new user via dashboard

When I go to create a new user in the dashboard it creates the user however I got this message array_flip() expects parameter 1 to be array, null given. http://prntscr.com/56n0xu

Comments

  • I can reproduce this, filed on github.

    It's only in the view logic.

  • @Bleistivt said:
    I can reproduce this, filed on github.

    It's only in the view logic.

    So it's something to do with vanilla and not plugins then, and is it major/any way to fix it as of yet?

  • BleistivtBleistivt Moderator
    edited November 2014

    It's only a display bug and doesn't affect the user creation.

    But you could change line 47 of /applications/dashboard/views/user/add.php to

    <?php echo $this->Form->CheckBoxList("RoleID", array_flip($this->RoleData), array_flip((array)$this->UserRoleData)); ?>
    
  • Another fix would be to turn off debug mode ;)

  • @Bleistivt said:
    Another fix would be to turn off debug mode ;)

    that would be the smartest, if you are not debugging. ;)

  • Not a bug, the real "fix" is to to make sure email works. I guess you were testing locally, @BIOS?

  • @Bleistivt said:
    Not a bug, the real "fix" is to to make sure email works. I guess you were testing locally, BIOS?

    Yeah, I've got it on local. So really just leave it since it isn't really anything that's going to affect the user creation.

    Would it be better to replace the code with the one you posted or just leave it as it is w/ debug off when the forum is actually accessible by public?

  • peregrineperegrine MVP
    edited November 2014

    you don't want debug on - period. unless you are debugging. especially in a public forum.

    changing core is not a good idea.

    especially, since you are only solving cosmetic issue. assuming e-mail works.

  • @peregrine said:
    you don't want debug on - period. unless you are debugging. especially in a public forum.

    changing core is not a good idea.

    especially, since you are only solving cosmetic issue. assuming e-mail works.

    Yea i know I'm not gonna have debug on public lmao. I mean right now I have it on just cause It's local and I'm testing everything it'll be off even before it gets uploaded.

    @peregrine said:
    changing core is not a good idea.
    especially, since you are only solving cosmetic issue. assuming e-mail works.

    Alright, this is the answer I needed, I'll just leave it as it is then.

Sign In or Register to comment.