PHP 8 issues

Support MB Custom Post Type PHP 8 issuesResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38406
    Max ElmanMax Elman
    Participant

    Hello,

    I have been upgrading my sites to PHP8 and fixing issues caught/cause by that. One of the issues was related to the plugin MB Custom Post Types & Custom Taxonomies, specifically by my taxonomy called media-kit-category. That was strange because all the setting were the same as my other taxonomies. After looking at the PHP code, I found that the last line looked like this:

    register_taxonomy( 'media-kit-category', ['[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', '[object Object]', 'media-kit'], $args );

    I don't know how long that like has been broken like that, but PHP 8 just caught the issue.

    Do you know why that happened? And how can I avoid that from happening on other sites?

    Thanks! 🙂

    #38423
    Long NguyenLong Nguyen
    Moderator

    Hi,

    This issue has been fixed a long time ago, from this commit https://github.com/wpmetabox/mb-custom-post-type/commit/12491d94f425496cdef03cb5516f091d6ce81121
    and relate to this topic https://support.metabox.io/topic/cpts-and-taxonomy-register-issues/

    I also do not see that issue on my demo site when getting the PHP code. Please make sure that you have the latest version of the MB Custom Post Type & Custom Taxonomy plugin v2.3.3 then recheck this issue.

    #38428
    Max ElmanMax Elman
    Participant

    Hi, thanks for the reply.
    I do have the latest version of all MB plugins and this is the only CPT with that issue, out of 10 CPTs.
    But it's ok, I'll keep an eye for it on my other sites.
    Thanks!

    #38439
    Long NguyenLong Nguyen
    Moderator

    Ok, let me know if you need anything further.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.