mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Prevent formatter from being invoked if bio is empty
This commit is contained in:
parent
c1af216872
commit
4b92840fde
|
@ -200,7 +200,7 @@ class User extends Model
|
||||||
*/
|
*/
|
||||||
public function getBioHtmlAttribute($value)
|
public function getBioHtmlAttribute($value)
|
||||||
{
|
{
|
||||||
if (! $value) {
|
if ($value === null) {
|
||||||
$this->bio_html = $value = static::formatBio($this->bio);
|
$this->bio_html = $value = static::formatBio($this->bio);
|
||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user