• Resolved tnoguchi

    (@tnoguchi)


    Hi,

    We’ve encountered a TypeError in php/classes/integrations/block/class-castos-blocks.php line 360 when calling ssp_get_podcasts();

    array_map(): Argument #2 ($array) must be of type array, WP_Error given

    On further investigation when examining ssp_get_podcasts() we noticed the following:

    return get_terms('series', array( 'hide_empty' => $hide_empty ));

    Where the taxonomy key is hard coded as series

    While this seems to work most of the time, if you override the taxonomy using the `ssp_series_taxonomy’ filter to update the “series” key it will produce an error anywhere where you’ve hardcoded the value like in ssp_get_podcasts(). Seems like there’s an alternative method to use ssp_series_taxonomy() to return the value of the key. Looks like the taxonomy key value is hardcoded elsewhere in the plugin code, so it may require investigating whether to update this value throughout, and/or find another solution.

Viewing 1 replies (of 1 total)
  • Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    Hi @tnoguchi!

    Thank you for bringing it to our attention.

    You are absolutely correct. Presently, the ‘series’ taxonomy is hardcoded in numerous places within the plugin, and our intention is to support the possibility to change it with filters in the future. Thessp_series_taxonomy filter is just the first step to it, but it’s not been announced in any documentation yet.

    So, unfortunately, currently, you can’t change the ‘series’ taxonomy with this filter, but it will be available in future plugin releases.

    Best regards,
    Sergiy

Viewing 1 replies (of 1 total)
  • The topic ‘TypeError in class-castos-blocks.php’ is closed to new replies.