ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.
https://wordpress.org/plugins/amp/
GNU General Public License v2.0
1.79k stars 382 forks source link

Deprecation error with PHP 8.2 #7817

Open milindmore22 opened 2 months ago

milindmore22 commented 2 months ago

Bug Description

A user reported an error with PHP 8.2 version.

PHP Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /srv/www/wp-includes/formatting.php on line 4494

The error occurs when you choose a static page as home page and disable AMP on the home page, the error appears on the settings page when you disable support for all templates

Expected Behaviour

The AMP version should be compatible with PHP 8.2

Screenshots

Screen Shot 2024-06-11 at 5 47 36 PM

Also note the over espcaing of the message.

PHP Version

8.2

Plugin Version

2.5.3

AMP plugin template mode

Transitional

WordPress Version

6.5.4

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

pexlechris commented 2 months ago

.