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 trialNicholas Mejia
23,800 PointsWhy does the code in the video switch randomly at about 6:26? The db Route suddenly contains a variable and a var_dump.
I've heard multiple complaints about different videos having these problems. I would overlook this if it weren't for the fact that a whole series of steps have now been skipped and there was 0 explanation as to why the code changed.
3 Answers
Patrik Balogh
47,986 PointsNo problem. It's been solved.
Exequiel R.
Courses Plus Student 16,828 PointsI also noticed it, when using the previous code you get an error because the query returns an object. I think Hampton was somewhat debugging and he used the return object->property or $result->name. I hope it helps.
Josip Dorvak
18,126 PointsIm pretty sure he was debugging a problem. All he did was assign the output from the DB where to a variable and printed it to the screen
Joseph Dillon
469 PointsJoseph Dillon
469 PointsThis does not appear to have been fixed. I had to repeat the video several times to figure out what had happened until I realized that the var_dump had been added and the return had been changed into a variable assignment.
There was no mention of this in the audio whatsoever. I'm still on my 14-day free trial and this is the first course I've started, so this doesn't exactly fill me with much confidence.