It appears your site has a wp_kses_allowed_html filter which is returning something other than an array. This is causing the AMP_Story_Post_Type::filter_kses_allowed_html() function in the AMP plugin to issue that warning, since it is expecting an array to be passed in.
However, I can see in the docs for wp_kses_allowed_html that it actually is supposed to allow either an array of a string. So this would appear to be a defect with the AMP plugin then.
We’ll fix this in the AMP plugin, but in the mean time you can fix the warning on your site with this patch:
--- a/includes/class-amp-story-post-type.php
+++ b/includes/class-amp-story-post-type.php
@@ -688,6 +688,10 @@ class AMP_Story_Post_Type {
* @return array Allowed tags.
*/
public static function filter_kses_allowed_html( $allowed_tags ) {
+ if ( ! is_array( $allowed_tags ) ) {
+ return $allowed_tags;
+ }
+
$story_components = [
'amp-story-page',
'amp-story-grid-layer',
Thank you, Weston! Haven’t really dealt with patches before, so this should be an experience.
Don’t worry about the patch specifically. You can just add the if statement to the includes/class-amp-story-post-type.php file.
This change was also merged into the AMP plugin and will be part of the next release: https://github.com/ampproject/amp-wp/pull/3879