AMP Plugin showing deprecated

Posted in: Newspaper
Post count: 127

Looking at a debug of my site I see the following….

[15-Jan-2023 22:46:22 UTC] PHP Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /home/site/wp-content/plugins/amp/includes/class-amp-http.php on line 95

AMP shows something about an invalid inline script. How do I fix this?

Post count: 21065

Hello @jtoney!

Please try to update your php version and see the results.

Thank you!

Post count: 127

I’m running 8.1 PHP, going to 8.2 breaks the site.

Post count: 21065

Hello @jtoney!

Try to set the php 7.4. It should work well.

Let me know the results!

Thank you!

Post count: 127

7.4 would be a downgrade and open up security vulnerabilities. I’m not prepared to do that. I was told your then was 8 compatible.

Post count: 35449

Hi jtoney,
Our theme was tested with PHP 7.4 and 8, at the moment those are the php versions tested with most of the plugins.
Now, if you are using php v8 and you get that PHP Deprecated message for amp, this means that the amp plugin was not tested with php v8. Also, the amp plugin is not a theme plugin and therefore the only suggestion is to use a previous php version, which should be 7.4.
I hope this will help you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.