error on PHP 8.2 (API v2 GET method)

[ad_1]

I working on API v2 of your plugin and I noticed that if the server using PHP 8.2 a php error occur while using GET method.

<br /> <b>Deprecated</b>: Creation of dynamic property NewsletterApi::$key is deprecated in <b>/home/XXXXXXX/domains/xxxxxxxx.xxx/public_html/wp-content/plugins/newsletter-api/plugin.php</b> on line <b>132</b><br />

Query URL:

https://xxxxxxxx.xxx/wp-json/newsletter/v2/subscribers/[email protected]?client_key=XXXXXXXXXXX&client_secret=XXXXXXXXXXXXXX

Result:

{"id":8,"email":"[email protected]","first_name":"","last_name":"","gender":null,"country":"","region":"","city":"","lists":[],"extra_fields":[],"status":"confirmed"}

On PHP 8.1 no error.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer