froger-me / wp-remote-users-sync

Synchronise users across WordPress websites
GNU General Public License v3.0
71 stars 34 forks source link

PHP 8.1 / 8.2 Deprecation Message #61

Closed masteradhoc closed 1 year ago

masteradhoc commented 1 year ago

Hi @froger-me Thanks for the amazing plugin - great work! While debugging an other issue i got this message while being on an up to date php version.

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns="http://www.w3.org/TR/REC-html40">

Deprecated | Constant FILTER_SANITIZE_STRING is deprecated | + wp-content/plugins/wp-remote-users-sync/inc/api/class-wprus-api-abstract.php:536 | 8 | Plugin: wp-remote-users-sync -- | -- | -- | -- | -- Deprecated | Constant FILTER_SANITIZE_STRING is deprecated | + wp-content/plugins/wp-remote-users-sync/inc/api/class-wprus-api-abstract.php:537 | 8 | Plugin: wp-remote-users-sync Deprecated | Creation of dynamic property Wprus_Api_Create::$password_handler is deprecated | + wp-content/plugins/wp-remote-users-sync/inc/api/class-wprus-api-abstract.php:300 | 1 | Plugin: wp-remote-users-sync

Just fyi, no hurry. :)

wormeyman commented 1 year ago

Is the following correct?

$data_get     = htmlspecialchars( filter_input( INPUT_GET, 'wprusdata' ) );
$data_post    = htmlspecialchars( filter_input( INPUT_POST, 'wprusdata' ) );
wormeyman commented 1 year ago

Or maybe even easier would be FILTER_SANITIZE_FULL_SPECIAL_CHARS but then people would have to use PHP8.1 or you'd have to test around it.

froger-me commented 1 year ago

Fixed in 414b2bf and 726fefb

masteradhoc commented 1 year ago

Thanks @froger-me !!

froger-me commented 1 year ago

ATM only on github - stay tuned for an official update on WP repo very soon!