Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+02:00)

This topic contains 3 replies, has 2 voices.

Last updated by Andrey 1 year, 2 months ago.

Assisted by: Andrey.

Author Posts
October 10, 2023 at 1:38 pm #14550611

alexanderB-16

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/visitliptov/web/*****/public_html/wp-content/plugins/wpml-string-translation/classes/slug-translation/custom-types/wpml-st-slug-custom-type.php on line 69

Plugin Name Status Active Version
WPML Multilingual CMS Installed Yes 4.6.6
WPML String Translation Installed Yes 3.2.8
WPML Media Installed No 2.7.3
WPML SEO Installed Yes 2.1.0

PHP
Version 8.1.2
Memory limit 1024M
Memory usage 36.48 MB
Max execution time 300
Max input vars 1000
Utf8mb4 charset Áno
SimpleXML extension Loaded
Multibyte String extension Loaded
WordPress
Version 6.3.1
Multisite Nie
Memory limit 1024M
Max memory limit 1024M

October 10, 2023 at 3:50 pm #14552265

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Are you getting this notification on the specific page?

If you have such a possibility, what results will be if you temporarily deactivate all the plugins except WPML?

Please back up your database before making any changes.

October 17, 2023 at 7:26 am #14590419

alexanderB-16

New version wpml string trnslation is bad code, correct is still old:

/wpml-string-translation/classes/slug-translation/custom-types/wpml-st-slug-custom-type.php on line 69

public function is_using_tags() {
$pattern = '#%([^/]+)%#';

$slug = $this->slug ? $this->slug : '';
$slug_translation = $this->slug_translation ? $this->slug_translation : '';

return preg_match( $pattern, $slug ) || preg_match( $pattern, $slug_translation );
}

My error is show if $this->slug is empty ... please fix it.

October 17, 2023 at 7:32 pm #14597675

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for the update. I wasn't able to replicate this on the fresh installation. On the local installation, I have added a custom post type and left the slug translation empty in WPML → Settings → Custom Post Type translation.

Could you help me to replicate it? In the next private reply, you will find the link to the staging site.

The topic ‘[Closed] [PHP 8.1] preg_match(): Passing null to parameter’ is closed to new replies.