UserInterface::getPassword() can return NULL

Created on 8 March 2023, almost 2 years ago
Updated 9 September 2023, over 1 year ago

Problem/Motivation

Follow-up for #3305807-14: Password is null if user has never logged in which causes PHP 8 warning
Since PHP 8.0 substr() does not allow NULL instead of string (when password is not set)

For example user with UID=0

Proposed resolution

Improve interface with proper type-hint that result can be NULL

Remaining tasks

patch/review/commit

User interface changes

no

API changes

UserInterface::getPassword() getting ?string return type

Data model changes

no

Release notes snippet

no

🐛 Bug report
Status

Fixed

Version

10.1

Component
User system 

Last updated 3 days ago

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024