By mstrelan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
The constants \Drupal\user\Controller\UserAuthenticationController::LOGGED_IN and \Drupal\user\Controller\UserAuthenticationController::LOGGED_OUT are intended to be used in a Response body, which is a string. For these reason their values have now changed from ints to strings.
Before:
const LOGGED_IN = 1;
const LOGGED_OUT = 0;
After:
const LOGGED_IN = '1';
const LOGGED_OUT = '0';
Any code using strict comparisons against these constants will need to be updated to match the string value.
Example:
if ($foo === UserAuthenticationController::LOGGED_IN) {
// This will now only match if $foo is a string.
}
Impacts:
Module developers