Check the correct return type in case preg_replace fails in ExternalBackend.php

This commit is contained in:
Eric Lippmann 2016-11-16 14:10:31 +01:00
parent 63bf9e20cd
commit f7e5cd3b71
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class ExternalBackend implements UserBackendInterface
if ($this->stripUsernameRegexp) {
$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
// additional message in that case?
$username = $stripped;