Skip to content

Commit d68658a

Browse files
authored
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
1 parent a84ea98 commit d68658a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ds_ldap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ public function getContainerTop($dn) {
991991
$return = $dn;
992992

993993
foreach ($this->getBaseDN() as $base) {
994-
if (preg_match("/${base}$/i",$dn)) {
994+
if (preg_match('/' . $base . '$/i',$dn)) {
995995
$return = $base;
996996
break;
997997
}

lib/xmlTemplates.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function __construct($server_id) {
7979

8080
# Ignore any files that are not the predefined custom files.
8181
if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only')
82-
&& ! preg_match("/^${custom_prefix}/",$file))
82+
&& ! preg_match('/^'. $custom_prefix . '/',$file))
8383
continue;
8484

8585
$filename = sprintf('%s/%s',$dir,$file);
@@ -122,7 +122,7 @@ function __construct($server_id) {
122122

123123
# Ignore any files that are not the predefined custom files.
124124
if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only')
125-
&& ! preg_match("/^${custom_prefix}/",$file))
125+
&& ! preg_match('/^'. $custom_prefix . '/',$file))
126126
continue;
127127

128128
$filename = sprintf('%s/%s',$dir,$file);

0 commit comments

Comments
 (0)