Added sanity check for loggable_query variable

This commit is contained in:
Joshua Sherman 2014-01-22 12:23:56 -05:00
parent ed90ee3501
commit d8e6c43868

View file

@ -227,7 +227,7 @@ class Database_PDO_Common extends Database_Common
$end_time = microtime(true); $end_time = microtime(true);
$duration = $end_time - $start_time; $duration = $end_time - $start_time;
if ($duration >= 1) if ($duration >= 1 && isset($loggable_query))
{ {
Log::slowQuery($duration . ' seconds: ' . $loggable_query); Log::slowQuery($duration . ' seconds: ' . $loggable_query);
} }