Protip: Use your code editor's "Find" feature, type in {
, then tell it to count the matches. Then repeat with }
. If the numbers don't match, odds are high you missed a brace.
Aside: Obviously, you may have a string that may not necessarily contain perfectly matches braces. In this case, I like to add a comment with the brace(s) needed to match the numbers. Example: preg_match("/\{abc.*/",$str); // }
In your case, it's 68 vs. 67.
Now use your code editor's bracket matching feature to find out which one is missing.
If your code editor doesn't have these features, use one that does (personal preference is Notepad++)
240. if(file_exists($folderPath . "/" . $fileName))
241. {
242. error($fileName . " already exists!!!");
243. $error = true;
244. // MISSING } HERE!!
245.
246.
247. # Checks if $file doesn't exist!