ampproject/amp-wp

PHP error: Undefined array key "type" in class-amp-validation-manager.php on line 1169

jcvignoli opened this issue · 5 comments

Bug Description

When executing WP updates (using a cron with wp-cli), I get:
Got error 'PHP message: PHP Warning: Undefined array key "type" in wp-content/plugins/amp/includes/validation/class-amp-validation-manager.php on line 1169'

Expected Behaviour

No warning

Screenshots

No response

PHP Version

PHP 8.2

Plugin Version

2.5.4

AMP plugin template mode

Transitional

WordPress Version

6.6.1

Site Health

No response

Gutenberg Version

No response

OS(s) Affected

No response

Browser(s) Affected

No response

Device(s) Affected

No response

Acceptance Criteria

No response

Implementation Brief

No response

QA Testing Instructions

No response

Demo

No response

Changelog Entry

No response

Same issue on WordPress.com hosting
PHP 8.1.29
WordPress 6.6.1
AMP plugin 2.54

A build with a fix is available for testing: #7864 (comment)

You can install the amp.zip for the production build via that comment.

I continue having the same issue, just the line has changed:
Got error 'PHP message: PHP Warning: Undefined array key "type" in wp-content/plugins/amp/includes/validation/class-amp-validation-manager.php on line 1176;
Currently WP 6.6.2, PHP 8.3, AMP 2.5.4

@jcvignoli The change has not been released yet. You can try the pre-release production build linked to from https://github.com/ampproject/amp-wp/wiki/Development-Builds

This has been released in v2.5.5.