Skip to content
Snippets Groups Projects

fix: fixed get_attribute checks isset instead of returning value

Merged Krzysztof Dyszczyk requested to merge bugfix/get-returns-bool into master
2 files
+ 7
3
Compare changes
  • Side-by-side
  • Inline

Files

@@ -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
}
Loading