Fatal error on 2 issues
-
I detected the following 2 issues:
1. Missing $display initialization.
2. $active_user is not defined.file: includes/elementor/helpers/form.php.
ACF FE version 2.8.0 – Elementor+ Pro: latest from Jan, 28th 2021 WP 5.6function acfef_display_form( $args ){ $display = false; // Missing initialization - added by me. if( !isset( $args['dynamic'] ) && !isset( $args['dynamic_manager'] ) ) { return true; }else{ $active_user = wp_get_current_user(); // error_log('acfef_display_form active user='. print_r($active_user, true) . ' args='. print_r($args, true)); if( isset( $args['dynamic'] ) ) { if( $args['dynamic'] ) { $author_id = false; if( '[author]' == $args['dynamic'] ) { $author_id = get_post_field( 'post_author', $args['post_id'] ); }else{ $author_id = get_post_meta( $args['post_id'], $args['dynamic'], true ); } if( $author_id == get_current_user_id() ){ // $active_user->ID ) { $display = true; } }else{ $display = true; } } if( isset( $args['dynamic_manager'] ) ){ $user_id = explode( 'user_', $args['post_id'] ); if( $args['dynamic_manager'] && isset( $user_id[1] ) ){ $manager_id = false; if( 'manager' == $args['dynamic_manager'] ) { $manager_id = get_user_meta( $user_id[1], 'acfef_manager', true ); }else{ $manager_id = get_user_meta( $user_id[1], $args['dynamic_manager'], true ); } if( $manager_id == get_current_user_id() ){ // $active_user->ID ) { $display = true; } }else{ $display = true; } } } return $display; }
- The topic ‘Fatal error on 2 issues’ is closed to new replies.