1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 17:23:00 +00:00

Bugfix: Check to make sure that a user's watchlist exists before checking to see if it's an array

This commit is contained in:
Starbeamrainbowlabs 2019-12-23 22:51:59 +00:00
parent f6d183a11e
commit ab179e4e83
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 3 additions and 3 deletions

View file

@ -172,10 +172,10 @@
{
"id": "feature-user-preferences",
"name": "User Preferences",
"version": "0.3.3",
"version": "0.3.4",
"author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting people do things like change their email address and password.",
"lastupdate": 1577140256,
"lastupdate": 1577140301,
"optional": false,
"extra_data": []
},

View file

@ -154,7 +154,7 @@ register_module([
// If the watchlist doesn't exist, create it
// Note that saving this isn't essential - so we don't bother unless we perform some other action too.
if(!is_array($env->user_data->watchlist))
if(!isset($env->user_data->watchlist) || !is_array($env->user_data->watchlist))
$env->user_data->watchlist = [];
switch($do) {