Hi Bernard,
Thanks for reporting that!
I will include this in the next release, but you can try it now if you want…
In the file mentioned in the warning: /wp-content/plugins/s2member/src/includes/classes/security-rest.inc.php
The lines mentioned, 45 and 46, are these:
$type = sanitize_key($route[2]); // e.g. pages
$id = (int)$route[3];
You can add these right before/above:
if (empty($route[2]) || empty($route[3]))
return $response;
So you’ll have this:
$route = $request->get_route(); // e.g. /wp/v2/pages
$route = explode('/', trim($route, '/'));
if (empty($route[2]) || empty($route[3]))
return $response;
$type = sanitize_key($route[2]); // e.g. pages
$id = (int)$route[3];
Let me know if you try it and if it helps you!
Warnings are not serious, errors would stop the script from going on. But you may want to hide warnings and errors. If not disable them, at least not display them on the site, instead log them into a file. https://wordpress.org/documentation/article/debugging-in-wordpress/#wp_debug_log
🙂
Thank you for this detailed response (no more warning for my tests).
Good morning Same problem on my side.
The warning disappeared after adding the lines above.
Thank you for your responsiveness and thank you to bernard92000 for reporting the problem.
This issue is preventing editing with elementor pro, the fix above solves it.
The latest v240325 release includes that fix. 🙂