app directory bug empty($privacy[‘show-email’] parentheses “)” missing.

About Support App app directory bug empty($privacy[‘show-email’] parentheses “)” missing.

Tagged: 

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9873
    Avatar for Richard HughesRichard Hughes
    Participant

    version 4.1.4
    App Directory error.

    the call to empty() for $privacy[‘show-email’] is not right and is causing this Fatal error. The closing parentheses is not in the right location.

    PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /htdocs/wp-content/plugins/church-admin/app/app-admin.php:5327

    line 5327 of app-admin.php has this code below.
    if(!empty($privacy[‘show-email’] && !empty($person->email) ) ){
    $emails[$name]=$person->email;
    }
    if(!empty($privacy[‘show-cell’] && !empty( $person->mobile) )){
    $mobiles[$name]=esc_html( $person->mobile);
    }

    Please update it to be:

    if(!empty($privacy[‘show-email’]) && !empty($person->email) ){
    $emails[$name]=$person->email;
    }
    if(!empty($privacy[‘show-cell’]) && !empty( $person->mobile) ){
    $mobiles[$name]=esc_html( $person->mobile);
    }

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.