• I’m running PHP 8.1.9 and WP Table Builder 1.4.4 on my site, and am getting some deprecation errors.

    preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated

    With call stack:

    wp-content/plugins/wp-table-builder/inc/admin/managers/icon-manager.php:144
    preg_match()
    wp-content/plugins/wp-table-builder/inc/admin/managers/icon-manager.php:144
    WP_Table_Builder\I\A\M\Icon_Manager->add_container()
    wp-content/plugins/wp-table-builder/inc/admin/managers/icon-manager.php:124
    WP_Table_Builder\I\A\M\Icon_Manager->get_icon()
    wp-content/plugins/wp-table-builder/inc/admin/managers/gutenberg-block-manager.php:154
    WP_Table_Builder\I\A\M\Gutenberg_Block_Manager->prepare_block_data()
    wp-content/plugins/wp-table-builder/inc/admin/managers/gutenberg-block-manager.php:91
    WP_Table_Builder\I\A\M\Gutenberg_Block_Manager->register_block()
    wp-includes/class-wp-hook.php:308
    do_action('init')
    wp-settings.php:617

    The $container variable is null, and that’s no longer ok.

    You’re also passing a null parameter here:

    // Add Welcome sub menu item.
    		$builder_page = add_submenu_page(
    			null,
    			esc_html__( 'Table Builder', 'wp-table-builder' ),
    			esc_html__( 'Welcome Page', 'wp-table-builder' ),
    			$menu_cap,
    			'wp-table-builder-welcome',
    			array( $this, 'welcome' )
    		);

    in wp-content/plugins/wp-table-builder/inc/admin/class-admin-menu.php:269. That’s also deprecated.

Viewing 1 replies (of 1 total)
  • Thread Starter Mikko Saari

    (@msaari)

    Your bundled Freemius plugin also has the same problem:

    $hook = FS_Admin_Menu_Manager::add_subpage(
        null,
        $title,
        $title,
        'manage_options',
        'freemius',
        array( 'Freemius', '_debug_page_render' )
    );

    in wp-content/plugins/wp-table-builder/inc/core/freemius/includes/class-freemius.php:3539 (and in several other places).

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8.1 deprecation warnings’ is closed to new replies.