diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index e2f0d58..aa5ed49 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -1470,7 +1470,7 @@ public function randomStringValidate($string) { // Starting or ending with a space means that length might not be what is // expected. - if (preg_match('/^(\s.*)|(.*\s)$/', $string)) { + if (preg_match('/^\s|\s$/', $string)) { return FALSE; }