Skip to content

Commit d8f51ac

Browse files
committed
Name check fix in $component->getAttribute
1 parent f2326a3 commit d8f51ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/HTMLServerComponent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class HTMLServerComponent
3232
*/
3333
function __get($name)
3434
{
35-
return $this->getAttribute(strtolower($name));
35+
return $this->getAttribute($name);
3636
}
3737

3838
/**
@@ -43,6 +43,7 @@ function __get($name)
4343
*/
4444
public function getAttribute($name, $defaultValue = null)
4545
{
46+
$name = strtolower($name);
4647
return isset($this->attributes[$name]) ? (string) $this->attributes[$name] : ($defaultValue === null ? null : (string) $defaultValue);
4748
}
4849

0 commit comments

Comments
 (0)