diff --git a/changelog.txt b/changelog.txt index 79731c88b182e7a99b9208ec5d18ddd4f13ca28f..ee2493bd9c3d7c31e97633474a1590abb0d726d8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ # 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 diff --git a/src/Field/Traits/HtmlAttributes.php b/src/Field/Traits/HtmlAttributes.php index df4f7608283875e284b4fdb9039d648c4deff21e..8116ee9f0218dc9568b9adffb28a331d07f48728 100644 --- a/src/Field/Traits/HtmlAttributes.php +++ b/src/Field/Traits/HtmlAttributes.php @@ -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 +}