From 54d8f3bf126c11127d4bdc021965a1901a1b889f Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 8 Apr 2014 23:57:09 +0200 Subject: [PATCH 1/2] Changed code for "strict standards" servers Strict Standards: Non-static method mysql_connection::get_instance() should not be called statically in /home/user/public_html/buggalo/config.php on line 10 --- config.php-dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.php-dist b/config.php-dist index ab0fa0b..89f4358 100644 --- a/config.php-dist +++ b/config.php-dist @@ -6,7 +6,7 @@ require_once(BASEDIR.'/libs/lib_mysql.php'); require_once(BASEDIR.'/session.php'); - new mysql_connection('dbname', 'localhost', 'username', 'password'); - $conn = &mysql_connection::get_instance(); - $conn->open(); + $conn = new mysql_connection('database', 'localhost', 'username', 'password'); + $conn->get_instance(); + $conn->open(); From b74f592c8b49b449f722cab93f870b7cdd6d1141 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 11 Apr 2014 04:14:20 +0200 Subject: [PATCH 2/2] added is_array check to see if rows > 0 --- issues.json.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/issues.json.php b/issues.json.php index f152bd4..6af9c55 100644 --- a/issues.json.php +++ b/issues.json.php @@ -50,16 +50,19 @@ session_set_issues($rows); $issues = array(); - foreach($rows as $row) { - $issues[] = array( - $row['id'], - $row['timestamp'], - $row['addon_name'], - $row['addon_version'], - $row['title'], - $row['ip'], - $row['status'] - ); + if (is_array($rows)) + { + foreach($rows as $row) { + $issues[] = array( + $row['id'], + $row['timestamp'], + $row['addon_name'], + $row['addon_version'], + $row['title'], + $row['ip'], + $row['status'] + ); + } } $issues_page = array_slice($issues, $start, $length);