-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
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
Error reporting in to the BaseArrayHelper::getValue() #19589
Comments
In what scenario you're getting such error? |
and who forbids doing this? public static function getValue($array, $key, $default = null)
{
if (empty($key)) {
return $default;
}
} |
It does not matter. Yii cannot use types in method signature due to supported PHP versions range, but it does not mean we should add guards for every possible misuse of any method in framework. If phpdoc does not allow to pass |
In this case I think a safeguard would not hurt. |
It may hide potential errors. That is the point why PHP started to emit deprecation for such cases. By adding bling guards Yii negates progress made by PHP. And if we're fine with that and decide that |
What steps will reproduce the problem?
Additional info
The text was updated successfully, but these errors were encountered: