• separatereality

    (@separatereality)


    Some user role/permissions lead to an fatal error:

    *3759 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #1 must be of type array, bool given in .../wordpress/wp-content/plugins/wp-cerber/cerber-settings.php:1037

    Root cause: crb_array_get() can return false which in consequence leads to the above error in line 1037 or 1041.

    Working with version wp-cerber 9.6 on php 8.1, wordpress 6.4.1

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter separatereality

    (@separatereality)

    Ok, seems we are not the only ones affected.
    If you want to fix it until the bug fix comes replace in /plugins/wp-cerber/cerber-settings.php the two lines in the if starting line 1036:

    if ( ! lab_lab() ) {
      // $role_conf = array_merge( $role_conf, $defaults );
      $role_conf = array_merge( is_array($role_conf)?$role_conf:[], $defaults );
    }
    else {
      // $role_conf = array_merge( $defaults, $role_conf );
      $role_conf = array_merge( $defaults, is_array($role_conf)?$role_conf:[] );
    }

    Same for me. Pretty severe if you ask me. Hope they take measures to fix this asap.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php fatal error during login when user has two roles’ is closed to new replies.