Prevent formatter from being invoked if bio is empty

This commit is contained in:
Toby Zerner 2015-06-08 09:34:39 +09:30
parent c1af216872
commit 4b92840fde

View File

@ -200,7 +200,7 @@ class User extends Model
*/
public function getBioHtmlAttribute($value)
{
if (! $value) {
if ($value === null) {
$this->bio_html = $value = static::formatBio($this->bio);
$this->save();
}