Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [Error Message] Error logging doesn't log the script name and line number for SQL errors
Not Solved
Hi, having activated error logging, MyBB logs errors in the file error.log without the script name and line number, such as the following:

	<friendly_type>MyBB SQL Error</friendly_type>
	<message>SQL Error: 22P02 - ERROR:  invalid input syntax for integer: «»
LINE 4:     AND p.dateline <= ''

				SELECT COUNT(p.dateline) AS count FROM mybb_posts p
				WHERE p.tid = '1'
				AND p.dateline <= ''
				AND (p.visible='0' OR p.visible='1')

Is this intented? Shouldn't it be a way for MyBB error handling to detect in which script the SQL query was called, and log it, so we can know what file to search for errors? In the above example, it should have logged:
Also, it would be a great plus if it also had the approximate line of the code that caused the error.

This happens to me in MyBB 1.6.10 using both MySQLi 5.5.24 and PostgreSQL 9.2.1
Not Solved
This is actually intended because all errors are thrown in inc/db_*.php which isn't helpful either. A debug trace would help but I'm not sure if it is planned for future versions.
[Image: banner.png]

Forum Jump:

Users browsing this thread: 1 Guest(s)