We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The deprecated craft\base\Model::getError() method has a string return type:
craft\base\Model::getError()
string
public function getError(string $attribute): string
However, it returns the result of the yii\base\Model::getFirstError() which can return null and throw a type error.
yii\base\Model::getFirstError()
null
user.getError('email')
The text was updated successfully, but these errors were encountered:
a9aebe4
No branches or pull requests
Description
The deprecated
craft\base\Model::getError()
method has astring
return type:However, it returns the result of the
yii\base\Model::getFirstError()
which can returnnull
and throw a type error.Steps to reproduce
user.getError('email')
Additional info
The text was updated successfully, but these errors were encountered: