• Hello,

    I have been running into an issue whenever I have edit flow enabled. In order to save a users new role, I have to disable Edit flow. I’m nearly ready to just uninstall and 0-star it.

    Steps to reproduce:
    Edit Flow 0.9.6 enabled
    Goto a user
    Change their role from a custom role to a custom built role.
    Click save

    Stacktrace:

    [0] => Array
    (
    [file] => C:\inetpub\wwwroot\wp-content\plugins\edit-flow\modules\user-groups\user-groups.php
    [line] => 704
    [function] => CustomStackTrace
    [args] => Array
    (
    [0] => 2
    [1] => Invalid argument supplied for foreach()
    [2] => C:\inetpub\wwwroot\wp-content\plugins\edit-flow\modules\user-groups\user-groups.php
    [3] => 704
    [4] => Array
    (
    [errors] => WP_Error Object
    (
    [errors] => Array
    (
    )

    [error_data] => Array
    (
    )

    )

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter j3gaming

    (@j3gaming)

    I did some very quick digging….

    Your plugin is passing “false” into the foreach loop

    $all_usergroups = $this->get_usergroups();
    var_dump($all_usergroups); // bool(false)
    foreach( $all_usergroups as $usergroup ) {

    I fixed by wrapping is_array around the foreach.
    Please look into this and fix for the next version!

    View post on imgur.com

    • This reply was modified 4 years, 4 months ago by j3gaming.
Viewing 1 replies (of 1 total)
  • The topic ‘Cannot save new user role’ is closed to new replies.