From 9e229e62282f5ca3f555db723d6b2d97d0b935eb Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 14 Jun 2018 18:14:54 +0200 Subject: [PATCH] fixed minor errors --- pandora_console/include/chart_generator.php | 11 ++++++----- pandora_console/include/functions.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index b36614f6dd..d89ab4444f 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -13,13 +13,14 @@ // GNU General Public License for more details. // Global & session manageme - - session_id($_GET["session_id"]); - -$user = file_get_contents(session_save_path() . "/pansess_" . session_id()); +if (file_exists(session_save_path() . "/pansess_" . session_id())) { + $user = file_get_contents(session_save_path() . "/pansess_" . session_id()); +} session_start(); -$_SESSION["id_usuario"] = $user; +if (isset($user)) { + $_SESSION["id_usuario"] = $user; +} session_write_close(); diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 9d75e8faee..6b6fda570f 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3238,7 +3238,7 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal $session_id = session_id(); $result = exec( - $config['phantomjs_bin'] ."/phantomjs " . $file_js . " " . + io_safe_output($config['phantomjs_bin']) . DIRECTORY_SEPARATOR ."phantomjs " . $file_js . " " . $url . " '" . $type_graph_pdf . "' '" . $params_encode_json . "' '" .