TypeError in class-castos-blocks.php
-
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.
- The topic ‘TypeError in class-castos-blocks.php’ is closed to new replies.