mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Check the correct return type in case preg_replace fails in ExternalBackend.php
This commit is contained in:
parent
63bf9e20cd
commit
f7e5cd3b71
@ -83,7 +83,7 @@ class ExternalBackend implements UserBackendInterface
|
|||||||
|
|
||||||
if ($this->stripUsernameRegexp) {
|
if ($this->stripUsernameRegexp) {
|
||||||
$stripped = preg_replace($this->stripUsernameRegexp, '', $username);
|
$stripped = preg_replace($this->stripUsernameRegexp, '', $username);
|
||||||
if ($stripped !== false) {
|
if ($stripped !== null) {
|
||||||
// TODO(el): PHP issues a warning when PHP cannot compile the regular expression. Should we log an
|
// TODO(el): PHP issues a warning when PHP cannot compile the regular expression. Should we log an
|
||||||
// additional message in that case?
|
// additional message in that case?
|
||||||
$username = $stripped;
|
$username = $stripped;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user