Поправил флаг в preg_replace

This commit is contained in:
Artem Vasilev 2022-11-03 19:45:25 +03:00
parent e8a5bfa96c
commit 2090e5cbce

View File

@ -84,7 +84,7 @@ class CertificateHelper
$commonName = null; $commonName = null;
if (preg_match('/CN="?(.+?)"?(?:,|$)/', $subjectName, $subjectMatch)) if (preg_match('/CN="?(.+?)"?(?:,|$)/', $subjectName, $subjectMatch))
{ {
$commonName = preg_replace('/"{2}/g', '"', $subjectMatch[1]); $commonName = preg_replace('/"{2}/', '"', $subjectMatch[1]);
} }
return $commonName; return $commonName;