1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 15:37:51 +02:00

fix: remove deprecation warning for decoding null values

This commit is contained in:
Daniël Klabbers
2022-08-02 13:28:03 +02:00
parent b06be43988
commit 590639f5f3

View File

@@ -81,7 +81,9 @@ class Notification extends AbstractModel
*/ */
public function getDataAttribute($value) public function getDataAttribute($value)
{ {
return json_decode($value, true); return $value !== null
? json_decode($value, true)
: null;
} }
/** /**