• michawerneke1212

    (@michawerneke1212)


    Dear Plugin Development Team,

    I am encountering a PHP parse error during the buddyboss group creation process. The error message is as follows:

    PHP Parse error:  syntax error, unexpected token "if" in (...)buddypress/groups/single/invite-anyone.php on line 22

    The issue arises because the if statement is outside the PHP tags. Here is my proposed solution to fix the syntax error:

    <?php do_action( 'bp_before_group_send_invites_content' ); ?>
    
    <?php if ( ! bp_get_new_group_id() ) { ?>
        <form action="<?php invite_anyone_group_invite_form_action(); ?>" method="post" id="send-invite-form">
    <?php } ?>
    
    <div class="left-menu">
        <h4 class="total-members-text">Members</h4>
        <ul class="first acfb-holder">
            <li>
                <input type="text" name="send-to-input" class="send-to-input" id="send-to-input" placeholder="<?php esc_html_e("Search members", 'buddyboss-theme'); ?>" />
            </li>
        </ul>
    
        <?php
        wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' );
    
        if ( ! invite_anyone_is_large_network( 'users' ) ) { ?>
            <div class="bb-select-members-text"><strong><?php esc_html_e( 'Select members:', 'buddyboss-theme' ); ?></strong></div>
    
            <div id="invite-anyone-member-list">
                <ul>
                    <?php bp_new_group_invite_member_list(); ?>
                </ul>
            </div>
        <?php } ?>
    </div>

    Please update the plugin to incorporate this fix to prevent this error from occurring during the group creation process.

    Thank you for your attention to this matter. I look forward to your response and the updated version of the plugin.

    Best regards,
    Micha

The topic ‘PHP Parse Error During Group Creation’ is closed to new replies.