Commit 1b9b0ff3 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(ldap) Fixed preg_match if

issue #1
parent 70b8f280
Pipeline #9019 passed with stages
in 57 seconds
...@@ -74,7 +74,7 @@ class Acl ...@@ -74,7 +74,7 @@ class Acl
*/ */
public function __construct (string $acl) public function __construct (string $acl)
{ {
if (preg_match('/^{(\d+)}/', $acl, $m) !== 1) { if (preg_match('/^{(\d+)}/', $acl, $m) === 1) {
$this->index = (int)($m[1]); $this->index = (int)($m[1]);
$acl = substr($acl, strlen($m[0])); $acl = substr($acl, strlen($m[0]));
} }
......
...@@ -79,7 +79,7 @@ class GeneralizedTime ...@@ -79,7 +79,7 @@ class GeneralizedTime
$timezone. $timezone.
'$/'; '$/';
if (preg_match($pattern, $string, $m) !== 1) { if (preg_match($pattern, $string, $m) === 1) {
if (!isset($m['minute']) || ($m['minute'] === '')) { if (!isset($m['minute']) || ($m['minute'] === '')) {
$m['minute'] = '00'; $m['minute'] = '00';
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment