PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.3
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.3
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
← All changes | features/upgrades/upgrades-functions.php +8 -3 3.15.9 → 4.0.3 View file →
@@ -333,11 +333,16 @@
333 333 return '';
334 334
335 335 $old_userlisting_settings = get_option( 'customUserListingSettings', 'not_found' );
336 336 if ( $old_userlisting_settings == 'not_found' )
337 - $old_userlisting_settings = get_option( 'userListingSettings' );
338 -
339 - if ( $old_userlisting_settings == 'not_found' )
337 + $old_userlisting_settings = get_option( 'userListingSettings', 'not_found' );
338 +
339 + // Bail on fresh installs (and any install with no legacy user-listing data).
340 + // Without the 'not_found' default above, get_option() returned `false` and
341 + // `false == 'not_found'` is false in PHP 8, so this guard let fresh installs
342 + // fall through and create a phantom 'Userlisting' post — which trips the
343 + // license gate in wppb_filter_own_post_creation() and wp_die()'s on activation.
344 + if ( $old_userlisting_settings == 'not_found' || empty( $old_userlisting_settings ) )
340 345 return;
341 346
342 347 $all_userlisting = ( isset( $old_userlisting_settings['allUserlisting'] ) ? wppb_replace_merge_tags( $old_userlisting_settings['allUserlisting'], true ) : '' );
343 348 $single_userlisting = ( isset( $old_userlisting_settings['singleUserlisting'] ) ? wppb_replace_merge_tags( $old_userlisting_settings['singleUserlisting'] ) : '' );