• Resolved Prachi Vashishtha

    (@prachi-vashishtha)


    I wanted to report that the plugin is not fully compatible with PHP 8.3. Upon running it in a PHP 8.3 environment, the following warning is generated:

    Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/csi/html/wp-includes/functions.php on line 7329

    Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/csi/html/wp-includes/functions.php on line 2189

    Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/csi/html/wp-includes/formatting.php on line 2819

    custom-post-type-ui.php:

      467       $capability_type = $post_type[‘capability_type’];

      468:      if ( false !== strpos( $post_type[‘capability_type’], ‘,’ ) ) {

      469           $caps = array_map( ‘trim’, explode( ‘,’, $post_type[‘capability_type’] ) );

    classes\class.cptui_admin_ui.php:

      586           $content = ‘<img src=”‘ . $menu_icon . ‘”>’;

      587:          if ( 0 === strpos( $menu_icon, ‘dashicons-‘ ) ) {

      588               $content = ‘<div class=”dashicons-before ‘ . $menu_icon . ‘”></div>’;


    inc\tools-sections\tools-post-types.php:

      23            $key      = key( $cptui_post_types );

      24:           $callback = ‘cptui_register_my_cpts_’ . str_replace( ‘-‘, ‘_’, esc_html( $cptui_post_types[ $key ][‘name’] ) );

      25        }

    inc\tools-sections\tools-taxonomies.php:

      22            $key      = key( $cptui_taxonomies );

      23:           $callback = ‘cptui_register_my_taxes_’ . str_replace( ‘-‘, ‘_’, esc_html( $cptui_taxonomies[ $key ][‘name’] ) );

    This issue seems to be related to deprecated functionality or compatibility issues in the above code. It would be great if the plugin developers could investigate and update the codebase to ensure compatibility with PHP 8.3.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yes, we should do what we can to guard against these types of things and are more than willing to do so as best we can. That said, these errors aren’t indicative of incompatibility with 8.3, it would mean incompatibility in the future when PHP core removes these bits completely.

    Is your install still creating these errors? Asking because I’m wondering if you could provide your CPTUI content type settings for easier recreation on my end, instead of trying to fill in some post types, hoping to recreate the same errors. Typically these types of errors come from upgrades of various settings, as compared to newly filled in fields as we try to prevent errors from the getgo as we add new ones, or have already fixed old errors.

    Beyond that looking over what we can do until we hear back with more, and visually trying to guard.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Any thoughts or new developments here @prachi-vashishtha ?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin Compatibility Issue with PHP 8.3’ is closed to new replies.