mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Fixed some typos (#12847)
This commit is contained in:

committed by
Alexander Makarov

parent
22a90cb817
commit
e8c16a09fa
@ -534,7 +534,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the errors for all attribute or a single attribute.
|
||||
* Returns the errors for all attributes or a single attribute.
|
||||
* @param string $attribute attribute name. Use null to retrieve errors for all attributes.
|
||||
* @property array An array of errors for all attributes. Empty array is returned if no error.
|
||||
* The result is a two-dimensional array. See [[getErrors()]] for detailed description.
|
||||
@ -633,7 +633,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
|
||||
|
||||
/**
|
||||
* Removes errors for all attributes or a single attribute.
|
||||
* @param string $attribute attribute name. Use null to remove errors for all attribute.
|
||||
* @param string $attribute attribute name. Use null to remove errors for all attributes.
|
||||
*/
|
||||
public function clearErrors($attribute = null)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ class BaseArrayHelper
|
||||
|
||||
if (is_object($array)) {
|
||||
// this is expected to fail if the property does not exist, or __get() is not implemented
|
||||
// it is not reliably possible to check whether a property is accessable beforehand
|
||||
// it is not reliably possible to check whether a property is accessible beforehand
|
||||
return $array->$key;
|
||||
} elseif (is_array($array)) {
|
||||
return (isset($array[$key]) || array_key_exists($key, $array)) ? $array[$key] : $default;
|
||||
|
Reference in New Issue
Block a user