2013-06-20, 04:20 PM
Hi, having activated error logging, MyBB logs errors in the file error.log without the script name and line number, such as the following:
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:
This happens to me in MyBB 1.6.10 using both MySQLi 5.5.24 and PostgreSQL 9.2.1
<error>
<dateline>1371742556</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 22P02 - ERROR: invalid input syntax for integer: «»
LINE 4: AND p.dateline <= ''
^
Query:
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')
</message>
</error>
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:
<script>showthread.php</script>
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