From 1792444a81b019a7a842d2ba5e869ca4d3ae91b2 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 23 Nov 2012 13:32:50 +0100 Subject: sqlbox/view: Fix missing $ in db connection check The default error_reporting of moodle, made that this programming error wasnt found earlier. --- sqlbox/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlbox/view.php') diff --git a/sqlbox/view.php b/sqlbox/view.php index 9940306..1f7cf41 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -84,7 +84,7 @@ $correct = true; echo $OUTPUT->heading('SQL Query: '.$data->sqlbox_query); if (isset($data->sqlbox_query)) { $db = pg_connect("host=localhost dbname=sqlbox user=sqlbox password=foobar"); - if (!db) + if (!$db) error("Failed to connect to sqlbox db"); $table = db_table_from_query($db, $data->sqlbox_query); -- cgit