Skip to content

Commit c7190ae

Browse files
Merge branch '3.3' into 3.4
* 3.3: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction [Filesystem] mirror - fix copying content with same name as source/target. Removed unnecessary getDefinition() call. .php_cs.dist - simplify config [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2 parents 2974d67 + abee215 commit c7190ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adapter/ExtLdap/Adapter.php

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

7474
// Per RFC 4514, leading/trailing spaces should be encoded in DNs, as well as carriage returns.
7575
if ((int) $flags & LDAP_ESCAPE_DN) {
76-
if (!empty($value) && $value[0] === ' ') {
76+
if (!empty($value) && ' ' === $value[0]) {
7777
$value = '\\20'.substr($value, 1);
7878
}
79-
if (!empty($value) && $value[strlen($value) - 1] === ' ') {
79+
if (!empty($value) && ' ' === $value[strlen($value) - 1]) {
8080
$value = substr($value, 0, -1).'\\20';
8181
}
8282
$value = str_replace("\r", '\0d', $value);

0 commit comments

Comments
 (0)