How do you find this bug?, unexpected $end

Hi guys,

Currently I encountered this stupid bug. lol

Parse error: syntax error, unexpected $end in /home2/myonliq6/public_html/warren/application/modules/admin/controllers/admin.php on line 388

And the complete codes for this, is the link below,

The bug is very common, but I can’t find it.
Please help me find it. lol

I don’t get that error, did you pastebin the correct file?

Yes that’s the correct file/codes.
It’s CI.

Usually that refers to a missing closing } or ) (or a missing semi-colon). I’m not seeing any of those in your pastebin and when I put it in a file and created a empty MX_Controller class, it opened without any errors…

@cpradio ;
That’s why it’s called illusive bug. lol, just joking.
Is it possible the bug show-up because sometimes my internet connection is slowing…?

Not sure how that’d be. PHP is server side so the execution across a slow connection shouldn’t be the culprit (unless you are trying to access the file before it is uploaded to the remote server)

Off Topic:

I like illusive bugs. Gives me a challenge :slight_smile:

I took a quick look and didn’t see any obvious problem. Are you sure the file that’s throwing the error isn’t corrupt? i.e. transfer was interrupted and so is only a partial file.

@Mittineague ;
Yeah possible that was the culprit, corrupt file.
Well the error is not showing anymore.