Hi @bartkleinreesink,
1. If I’m not mistaken it’s not an error, but a PHP deprecation notice. But it definately needs to be taken care of. That’s exactly what these PHP 8.1 deprecation notices are for ??
2. According to the iTSec plugin 8.1.3 Changelog:
Bug Fix: Preliminary PHP 8.1 compatibility.
So it looks like PHP 8.1 compatibility is a work in progress.
3. I prefer a type casting solution:
1101 $home_path = (string) parse_url( get_option( 'home' ), PHP_URL_PATH );
1102 $home_path = trim( $home_path, '/' );
4. It may be worth looking into why parse_url( get_option( 'home' ), PHP_URL_PATH )
returns a null value. There is a lot (filters) happening in the WordPress core get_option() function. And according to the PHP doc of the parse_url() function:
If the requested component doesn’t exist within the given URL, null will be returned.
I may be wrong but parse_url( get_option( 'home' ), PHP_URL_PATH )
should “normally” return the (string) path value from the Site Address (URL) field in the WordPress General Settings page. That said there may be a very good reason why it returns a null value in your env.
+++++ To prevent any confusion, I’m not iThemes +++++
-
This reply was modified 1 year, 11 months ago by nlpro.
-
This reply was modified 1 year, 11 months ago by nlpro.