mirror of
https://github.com/typecho/typecho.git
synced 2025-01-16 20:18:19 +01:00
fix: choose the correct key when setting widget value (#1702)
This commit is contained in:
parent
0d28025bf4
commit
a30a6c122d
@ -481,7 +481,14 @@ abstract class Widget
|
||||
*/
|
||||
public function __set(string $name, $value)
|
||||
{
|
||||
$this->row[$name] = $value;
|
||||
$method = '___' . $name;
|
||||
$key = '#' . $name;
|
||||
|
||||
if (isset($this->row[$key]) || method_exists($this, $method)) {
|
||||
$this->row[$key] = $value;
|
||||
} else {
|
||||
$this->row[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user