Skip to content

Commit e0ae798

Browse files
committed
Remove unnecessary empty usages
1 parent f4f061d commit e0ae798

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Adapter/ExtLdap/Adapter.php

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

5757
// Per RFC 4514, leading/trailing spaces should be encoded in DNs, as well as carriage returns.
5858
if ($flags & \LDAP_ESCAPE_DN) {
59-
if (!empty($value) && ' ' === $value[0]) {
59+
if ($value && ' ' === $value[0]) {
6060
$value = '\\20'.substr($value, 1);
6161
}
62-
if (!empty($value) && ' ' === $value[\strlen($value) - 1]) {
62+
if ($value && ' ' === $value[\strlen($value) - 1]) {
6363
$value = substr($value, 0, -1).'\\20';
6464
}
6565
$value = str_replace("\r", '\0d', $value);

Adapter/ExtLdap/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private function resetPagination(): void
175175
// This is not supported in PHP < 7.2, so these versions will remain broken.
176176
$ctl = [];
177177
ldap_get_option($con, \LDAP_OPT_SERVER_CONTROLS, $ctl);
178-
if (!empty($ctl)) {
178+
if ($ctl) {
179179
foreach ($ctl as $idx => $info) {
180180
if (static::PAGINATION_OID == $info['oid']) {
181181
unset($ctl[$idx]);

0 commit comments

Comments
 (0)