From d68658a82bba9966c991479cdaf5eeabe2191fe4 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Wed, 13 Sep 2023 03:26:48 +0200 Subject: [PATCH] Fix Using ${var} in strings is deprecated (#233) - Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/phpldapadmin/lib/xmlTemplates.php on line 82 - Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/phpldapadmin/lib/xmlTemplates.php on line 125 - Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/phpldapadmin/lib/ds_ldap.php on line 994 --- lib/ds_ldap.php | 2 +- lib/xmlTemplates.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 8a4d3e00..11c527d2 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -991,7 +991,7 @@ class ldap extends DS { $return = $dn; foreach ($this->getBaseDN() as $base) { - if (preg_match("/${base}$/i",$dn)) { + if (preg_match('/' . $base . '$/i',$dn)) { $return = $base; break; } diff --git a/lib/xmlTemplates.php b/lib/xmlTemplates.php index 4a40ba8d..7c495e14 100644 --- a/lib/xmlTemplates.php +++ b/lib/xmlTemplates.php @@ -79,7 +79,7 @@ abstract class xmlTemplates { # Ignore any files that are not the predefined custom files. if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only') - && ! preg_match("/^${custom_prefix}/",$file)) + && ! preg_match('/^'. $custom_prefix . '/',$file)) continue; $filename = sprintf('%s/%s',$dir,$file); @@ -122,7 +122,7 @@ abstract class xmlTemplates { # Ignore any files that are not the predefined custom files. if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only') - && ! preg_match("/^${custom_prefix}/",$file)) + && ! preg_match('/^'. $custom_prefix . '/',$file)) continue; $filename = sprintf('%s/%s',$dir,$file);