diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b4df516fca..784b45d960 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-03-06 Miguel de Dios + + * include/functions_io.php, include/db/mysql.php: fixed warnings + messages from PHP. + + Fixes: #3607014 + 2013-03-06 Miguel de Dios * godmode/agentes/configurar_agente.php: fixed the lost ip in the diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 04846afb55..21d077f317 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -712,7 +712,12 @@ function mysql_db_get_all_rows_filter ($table, $filter = array(), $fields = fals function mysql_db_get_num_rows ($sql) { $result = mysql_query($sql); - return mysql_num_rows($result); + if ($result) { + return mysql_num_rows($result); + } + else { + return 0; + } } /** @@ -926,7 +931,12 @@ function mysql_db_get_all_row_by_steps_sql($new = true, &$result, $sql = null) { if ($new == true) $result = mysql_query($sql); - return mysql_fetch_assoc($result); + if ($result) { + return mysql_fetch_assoc($result); + } + else { + return array(); + } } /** diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index a9674b065f..ad4c0995bb 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -382,7 +382,7 @@ function __ ($string /*, variable arguments */) { return $tranlateString; } } - elseif ($config['enterprise_installed'] && + elseif (enterprise_installed() && isset($config['translate_string_extension_installed']) && $config['translate_string_extension_installed'] == 1 && array_key_exists('translate_string.php', $extensions)) {