Skip to content

Commit f1d5e3a

Browse files
Merge branch '2.7' into 2.8
* 2.7: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
1 parent ac0578b commit f1d5e3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LdapClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ public function escape($subject, $ignore = '', $flags = 0)
111111

112112
// Per RFC 4514, leading/trailing spaces should be encoded in DNs, as well as carriage returns.
113113
if ((int) $flags & LDAP_ESCAPE_DN) {
114-
if (!empty($value) && $value[0] === ' ') {
114+
if (!empty($value) && ' ' === $value[0]) {
115115
$value = '\\20'.substr($value, 1);
116116
}
117-
if (!empty($value) && $value[strlen($value) - 1] === ' ') {
117+
if (!empty($value) && ' ' === $value[strlen($value) - 1]) {
118118
$value = substr($value, 0, -1).'\\20';
119119
}
120120
$value = str_replace("\r", '\0d', $value);

0 commit comments

Comments
 (0)