MyBB Community Forums
[General] "null" in Blank Profile Fields - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [General] "null" in Blank Profile Fields (/thread-209217.html)



"null" in Blank Profile Fields - Sharree - 03-21-2017

The custom profile fields I've set up for my forum are working fine but many users who've left their profile fields blank are displaying "null" when outputted on a page.

Is there a query I can run to remove the "null" and ensure it wont happen with future users?


As you can see in the middle area, the user hadn't filled out the About Me field so it's outputting as "null"
[Image: d4726bbdef21c921cacaddb168fceb8f.png]


RE: "null" in Blank Profile Fields - chack1172 - 03-22-2017

you can try to do it with php.
For example if the variable is $a:
if (!$a) {
    $a = "";
}