• Hello, just started using visibility logic and it has been serving us well. Just wanted to tell you that there is a problem with the function that checks if a user meta with the value being an array is used. If forse some reason the user doesn’t have the meta key in it’s profile, get_user_meta returns false. This means that when you check for a value inside the meta’s array, array_intersect breaks because you are not passing an array but a boolean. I fixed it by changing at line 327 of UserMetaVisibility.php to this:

    if ( $user_meta != false && empty( array_intersect( $user_meta, $values ) ) ) {
    						$meta_is_consistent = false;
    }

    Edit: actually i just found there is already an if that checks if the value is an array. The only problem is that the comparison just under it still runs array_intersects so it breaks :).

    • This topic was modified 1 year, 11 months ago by silvaluca.
Viewing 1 replies (of 1 total)
  • Hi there,

    Sorry about this issue.

    In this case, we are actually aware of this issue as bit was previously brought forth in this forum and we have notified the development team about it.

    Our team will be looking into providing a permanent fix to this.

    Kindly bear with us in the meantime.

    Regards,

    John

Viewing 1 replies (of 1 total)
  • The topic ‘Error when user not logged in and “user meta contains in array” is used’ is closed to new replies.