View Issue Details

IDProjectCategoryView StatusLast Update
0017187phpList 3 applicationGeneralpublic13-02-19 12:28
Reporterduncanc Assigned To 
Status resolvedResolutionfixed 
Product Version3.0.6 
Target Version3.0.7Fixed in Version3.0.7 
Summary0017187: SQL is not displayed when an error occurs
DescriptionIn and the variable $lastquery is not always set. So when an error occurs on a query the sql is not displayed.

In function Sql_Query $lastquery is set only when $developer_email is already set (which is usually not the case). So in function Sql_Error() that variable is undefined.

It would be more useful to always display the sql when an error occurs.
TagsNo tags attached.


related to 0017172 resolvedmichiel update to 



15-05-14 14:28

administrator   ~0053726

no, for security it is custom to not display SQL errors, to avoid SQL Injection profiling.

So, it should only really display the SQL in developer mode. The undefined variable needs to be caught as well.


28-06-14 13:14

updater   ~0054067

Corrected function name where the undefined variable occurs


28-06-14 13:48

updater   ~0054068

Another small issue in and with functions dbg() and cl_output().
These are defined in connect.php, so if any database errors happen before connect.php has been included then they will not have been defined.
Looking at index.php languages.php and defaultconfig.php are included before connect.php.


28-06-14 13:48

updater   ~0054069

Need to add file to the GitHub repository.