My updated code generates warnings on export as reported by @vladdu in the Statamic Discord (thanks for the report!) ``` PHP Warning: Invalid argument supplied for foreach() in /home/forge/somesite/wp-includes/class-wp-list-util.php on line 148 ``` Need to check output of `get_the_tags()` for non-array values before `wp_list_pluck()`ing. `get_the_category()` returns an empty array if there are not categories or if something goes wrong so don't need to check this.
My updated code generates warnings on export as reported by @vladdu in the Statamic Discord (thanks for the report!)
Need to check output of
get_the_tags()for non-array values beforewp_list_pluck()ing.get_the_category()returns an empty array if there are not categories or if something goes wrong so don't need to check this.