Skip to content
Snippets Groups Projects
Commit cd77b114 authored by David Galeano's avatar David Galeano
Browse files

Issue #3485353 by gxleano: Update setAlt() and getAlt() methods to handle null entries

parent d4db95a5
No related branches found
No related tags found
1 merge request!4Issue #3485353 by gxleano: Update setAlt() and getAlt() methods to handle null entries
......@@ -195,19 +195,19 @@ class ImgElement extends ElementBase {
* return Alt.
*/
public function getAlt(): string {
return $this->alt;
return $this->alt ?? '';
}
/**
* Setter for Alt.
*
* @param string $alt
* @param string|null $alt
* Alt value.
*
* @return ImgElement
* Self Reference.
*/
public function setAlt(string $alt): ImgElement {
public function setAlt(?string $alt): ImgElement {
$this->alt = $alt;
return $this;
}
......
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