Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBob Sutherton
20,160 PointsI'm getting the white screen of death!
This is in the context of the treehouse badges plugin video attached to this post. When I remove this short line of code my website reappears again. When I put it back in it is the white screen of the abyss.
if( $options != '' ) {
$wptreehouse_username = $options['wptreehouse_username']
}
If you need to see the larger context that this code is in to be able to answer, I can post that. I can't find anything different about this than what Zac has done.
2 Answers
Nejc Vukovic
Full Stack JavaScript Techdegree Graduate 51,574 Pointsif( $options != '' ) {
$wptreehouse_username = $options['wptreehouse_username'];
}
Maybe the semicolon?
Nejc Vukovic
Full Stack JavaScript Techdegree Graduate 51,574 PointsYou are welcome.
Well in my opinion I close every line with a semicolon (good practice) . I'm used to it from my school times : C++ .
Bob Sutherton
20,160 PointsThanks for the tip!
Nejc Vukovic
Full Stack JavaScript Techdegree Graduate 51,574 PointsWelcome. Just to share: I watched JavaScript Course and in the beginning Jim didn't put an semicolon in his code... And my jaw dropped when the code passed normally :D
It's not a must to put a semicolon on every line, but hell I'm putting 2 just to be sure:D
Bob Sutherton
20,160 PointsBob Sutherton
20,160 PointsThanks dude! I swear I thought I had tried that. The funny thing is that Zac doesn't use it in his code so I was just copying him.