Skip to content
Snippets Groups Projects
Commit cd630065 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

Merge branch 'bugfix/get-returns-bool' into 'master'

fix: fixed get_attribute checks isset instead of returning value

See merge request !17
parents 2a346d90 dc2eaeae
No related branches found
Tags 2.4.6
1 merge request!17fix: fixed get_attribute checks isset instead of returning value
Pipeline #5912 passed with warnings with stages
in 1 minute and 29 seconds
# Changelog
## [2.4.6] - 2021-08-23
### Fixed
- Get attribute now returns attribute instead of bool value
## [2.4.5] - 2021-06-02
### Fixed
- Added text multiple field
......
......@@ -61,9 +61,9 @@ trait HtmlAttributes {
* @param string $name
* @param mixed $default
*
* @return mixed
* @return string
*/
public function get_attribute( $name, $default = null ) {
return isset( $this->attributes[ $name ] ) ?: $default;
return $this->attributes[ $name ] ?? $default;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment