wordpress-to-statamic-exporter icon indicating copy to clipboard operation
wordpress-to-statamic-exporter copied to clipboard

Warnings on export

Open rosswintle opened this issue 5 years ago • 0 comments

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.

rosswintle avatar May 03 '19 10:05 rosswintle