Jump to content

Line Numbers Reported In Error Messages Are Not Correct


Recommended Posts

Hi,

 

I'm having trouble tracking down a bug in my PHP.

 

The first attachment shows the error I'm getting (I would have pasted it in if the paste function worked, but it doesn't).

 

The second attachment shows the code, with line numbers. I again I would have included this in the message, if I could have done without retyping it.

 

My question is, why is it reporting that the error concerning the parameter of mysqli_num_rows() occurs in line 20? Line 20 is a comment. Even if it were not a comment, it does not contain a call to mysqli_num_rows(). I suppose it must be objecting to line 28, since that's where the call to the function is, but why is it not reporting the right line number? This just makes debugging extremely difficult...

 

Thanks - Rowan

post-7932-0-25265700-1483621635_thumb.png

post-7932-0-37055100-1483623050_thumb.png

Edited by sylvest
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...