Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP PHP User Authentication Building the Library Adding Books

Unexpected error line 37 functions.php

I get an error at line 36 in functions.php so I cannot refresh the website without the error popping up, which makes it hard for me to continue with this class.

here's a snapshot of my code https://w.trhou.se/914wd6s2qv

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

To assist you with this we will need to see your code and likely all of it. The easiest way to share this with us is to link us to a snapshot. This will allow us to fork your workspace and have a look around. :sparkles:

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Kaleb Mesho Abraha ! I took the liberty of forking your workspace and the error is an unexpected end of file. On line 37 there is a close curly brace that matches up to close the catch part of that function. But there is not matching closing curly brace for the function itself which is resulting in an unexpected end. On line 38 there should be an additional closing curly brace }. Adding this corrects the error and I can once again click on the "Books" link with no problems.

Hope this helps! :sparkles:

https://w.trhou.se/914wd6s2qv

thats the snapshot