From 0d321f53112bcb5535beb541374353385c541d50 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 1 Aug 2023 11:19:04 +0200 Subject: [PATCH 1/4] #11739 Fixed deprecated functions 3 --- pandora_console/godmode/agentes/agent_manager.php | 2 +- pandora_console/include/functions_graph.php | 4 ++++ .../include/lib/ClusterViewer/ClusterManager.php | 6 +----- .../update_manager_client/lib/UpdateManager/Client.php | 2 +- pandora_console/vendor/artica/phpchartjs/src/Defaults.php | 2 ++ .../vendor/artica/phpchartjs/src/Options/Plugins.php | 6 ++++++ 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index cbe7858e9e..82540a7a64 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -931,7 +931,7 @@ foreach ($fields as $field) { // Filling the data. $combo = []; $combo = $field['combo_values']; - $combo = explode(',', $combo); + $combo = explode(',', (empty($combo) === true) ? [] : $combo); $combo_values = []; foreach ($combo as $value) { $combo_values[$value] = $value; diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 13085fa24c..1892b0cd31 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1003,6 +1003,10 @@ function grafico_modulo_sparse($params) ]; } + if ($data_module_graph === false) { + $data_module_graph = []; + } + $data_module_graph['series_suffix'] = $series_suffix; // Check available data. diff --git a/pandora_console/include/lib/ClusterViewer/ClusterManager.php b/pandora_console/include/lib/ClusterViewer/ClusterManager.php index f841581491..3afff1adb3 100644 --- a/pandora_console/include/lib/ClusterViewer/ClusterManager.php +++ b/pandora_console/include/lib/ClusterViewer/ClusterManager.php @@ -353,11 +353,7 @@ class ClusterManager */ public function getCount() { - if (isset($this->count) !== true) { - $this->count = $this->getAll('count'); - } - - return $this->count; + return $this->getAll('count'); } diff --git a/pandora_console/update_manager_client/lib/UpdateManager/Client.php b/pandora_console/update_manager_client/lib/UpdateManager/Client.php index ba1574d8f9..2525fd4f2b 100644 --- a/pandora_console/update_manager_client/lib/UpdateManager/Client.php +++ b/pandora_console/update_manager_client/lib/UpdateManager/Client.php @@ -496,7 +496,7 @@ class Client throw new \Exception('Please provide homedir path to use UMC'); } - if (is_dir($this->remoteConfig) === true + if (empty($this->remoteConfig) === false && is_dir($this->remoteConfig) === true && is_dir($this->remoteConfig.'/updates') === false ) { mkdir($this->remoteConfig.'/updates/'); diff --git a/pandora_console/vendor/artica/phpchartjs/src/Defaults.php b/pandora_console/vendor/artica/phpchartjs/src/Defaults.php index 972b1bfb8c..c3ece0bb1c 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Defaults.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Defaults.php @@ -23,6 +23,8 @@ class Defaults implements ChartOwnedInterface, ArraySerializableInterface, JsonS */ private $font; + protected $watermark; + /** * Return Font. diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php index f1dc674a2a..6f638a06ad 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php @@ -14,6 +14,12 @@ class Plugins implements ArraySerializableInterface, JsonSerializable { use ArraySerializable; + protected $legend; + + protected $title; + + protected $datalabels; + /** * Return Legend. From aef7f0edd0ee0a5dc46ce637d52529038a1f7a33 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 1 Aug 2023 14:51:31 +0200 Subject: [PATCH 2/4] #11739 Fixed deprecated functions 4 --- pandora_console/general/header.php | 4 +++- pandora_console/include/class/NetworkMap.class.php | 4 +++- pandora_console/include/functions_html.php | 4 ++++ pandora_console/include/functions_io.php | 12 ++++++++---- pandora_console/include/functions_ui.php | 2 +- .../operation/agentes/pandora_networkmap.view.php | 7 ++++++- .../artica/phpchartjs/src/DataSetCollection.php | 2 +- .../vendor/artica/phpchartjs/src/Defaults.php | 2 +- .../artica/phpchartjs/src/LabelsCollection.php | 2 +- .../vendor/artica/phpchartjs/src/Options.php | 2 +- .../artica/phpchartjs/src/Options/Elements/Arc.php | 2 +- .../artica/phpchartjs/src/Options/Elements/Line.php | 2 +- .../artica/phpchartjs/src/Options/Elements/Point.php | 2 +- .../phpchartjs/src/Options/Elements/Rectangle.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Fonts.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Hover.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Layout.php | 2 +- .../artica/phpchartjs/src/Options/Layout/Padding.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Legend.php | 2 +- .../artica/phpchartjs/src/Options/Legend/Labels.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Plugins.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Scale.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Scales.php | 2 +- .../phpchartjs/src/Options/Scales/GridLines.php | 2 +- .../phpchartjs/src/Options/Scales/ScaleLabel.php | 2 +- .../artica/phpchartjs/src/Options/Scales/Ticks.php | 2 +- .../artica/phpchartjs/src/Options/Scales/XAxis.php | 2 +- .../src/Options/Scales/XAxisCollection.php | 2 +- .../src/Options/Scales/YAxisCollection.php | 2 +- .../vendor/artica/phpchartjs/src/Options/Title.php | 2 +- .../artica/phpchartjs/src/Options/Tooltips.php | 2 +- .../phpchartjs/src/Options/Tooltips/Callbacks.php | 2 +- .../artica/phpchartjs/src/Options/WaterMark.php | 2 +- .../artica/phpchartjs/src/PluginsCollection.php | 2 +- 34 files changed, 53 insertions(+), 36 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 36090b9446..b73e2d63e3 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -228,7 +228,9 @@ echo sprintf('
', $menuTypeClass); ); $autorefresh_list = json_decode( - $select[0]['autorefresh_white_list'] + (empty($select[0]['autorefresh_white_list']) === false) + ? $select[0]['autorefresh_white_list'] + : '' ); $header_autorefresh = ''; diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index f65ddf95ce..353a17b80e 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -2392,7 +2392,9 @@ class NetworkMap unlink($filename_dot); - if (function_exists($this->customParser)) { + if (empty($this->customParser) === false + && function_exists($this->customParser) + ) { try { if (empty($this->customParserArgs)) { $graph = call_user_func( diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 1b232ca1ca..241d51a5c0 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -578,6 +578,10 @@ function html_print_select_groups( if (empty($nothing) === false) { $fields[$nothing_value] = $nothing; + if ($include_groups === false) { + $include_groups = []; + } + $include_groups[$nothing_value] = $nothing; } diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index e4295332fa..6283fdbaed 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -221,6 +221,10 @@ function io_safe_output_array(&$item, $key=false, $utf8=true) */ function io_safe_output($value, $utf8=true) { + if (empty($value) === true) { + return $value; + } + if (is_numeric($value)) { return $value; } @@ -235,16 +239,16 @@ function io_safe_output($value, $utf8=true) $value = utf8_encode($value); } - // Replace the html entitie of ( for the char + // Replace the html entitie of ( for the char. $value = str_replace('(', '(', $value); - // Replace the html entitie of ) for the char + // Replace the html entitie of ) for the char. $value = str_replace(')', ')', $value); - // Replace the html entitie of < for the char + // Replace the html entitie of < for the char. $value = str_replace('<', '<', $value); - // Replace the html entitie of > for the char + // Replace the html entitie of > for the char. $value = str_replace('>', '>', $value); if ($utf8) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 7b191d599a..0ce9201d09 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -884,7 +884,7 @@ function ui_print_os_icon( $networkmap=false, $only_src=false, $relative=false, - $options=false, + $options=[], $big_icons=false ) { $subfolder = '.'; diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 2c69332e19..5256c10871 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -2286,7 +2286,12 @@ if (enterprise_installed()) { $map_dash_details['z_dash'] = $z_dash; $networkmap = db_get_row('tmap', 'id', $id); } else { - $networkmap_filter = json_decode($networkmap['filter'], true); + $networkmap_filter = json_decode( + (empty($networkmap['filter']) === false) + ? $networkmap['filter'] + : '', + true + ); if ($networkmap_filter['x_offs'] != null) { $map_dash_details['x_offs'] = $networkmap_filter['x_offs']; } else { diff --git a/pandora_console/vendor/artica/phpchartjs/src/DataSetCollection.php b/pandora_console/vendor/artica/phpchartjs/src/DataSetCollection.php index 6028bbe0fb..f37951ed84 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/DataSetCollection.php +++ b/pandora_console/vendor/artica/phpchartjs/src/DataSetCollection.php @@ -29,7 +29,7 @@ class DataSetCollection extends ArrayAccess implements JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { $rows = []; foreach ($this->data as $row) { diff --git a/pandora_console/vendor/artica/phpchartjs/src/Defaults.php b/pandora_console/vendor/artica/phpchartjs/src/Defaults.php index c3ece0bb1c..0b948a2005 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Defaults.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Defaults.php @@ -59,7 +59,7 @@ class Defaults implements ChartOwnedInterface, ArraySerializableInterface, JsonS /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/LabelsCollection.php b/pandora_console/vendor/artica/phpchartjs/src/LabelsCollection.php index fec0e2491b..7bb3936536 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/LabelsCollection.php +++ b/pandora_console/vendor/artica/phpchartjs/src/LabelsCollection.php @@ -15,7 +15,7 @@ class LabelsCollection extends ArrayAccess implements JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->data; } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options.php b/pandora_console/vendor/artica/phpchartjs/src/Options.php index c8c6c8037b..b1b5c91ad3 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options.php @@ -326,7 +326,7 @@ class Options implements ChartOwnedInterface, ArraySerializableInterface, JsonSe /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Arc.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Arc.php index a44cb9e295..ff1e7c8653 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Arc.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Arc.php @@ -102,7 +102,7 @@ class Arc implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Line.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Line.php index 66f9bf3cd8..2bc240e157 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Line.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Line.php @@ -316,7 +316,7 @@ class Line implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Point.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Point.php index 3873656687..53415c0c2c 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Point.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Point.php @@ -281,7 +281,7 @@ class Point implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Rectangle.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Rectangle.php index ccd35f73a0..6e07506237 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Rectangle.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Elements/Rectangle.php @@ -135,7 +135,7 @@ class Rectangle implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Fonts.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Fonts.php index 5f5a7c7746..b18fe06718 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Fonts.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Fonts.php @@ -154,7 +154,7 @@ class Fonts implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Hover.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Hover.php index 36cf1474f1..2b4000ca57 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Hover.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Hover.php @@ -127,7 +127,7 @@ class Hover implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Layout.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Layout.php index b41a20cc37..dc918e2e6f 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Layout.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Layout.php @@ -52,7 +52,7 @@ class Layout implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Layout/Padding.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Layout/Padding.php index 0b62c162e4..2dfbd89586 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Layout/Padding.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Layout/Padding.php @@ -117,7 +117,7 @@ class Padding implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Legend.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Legend.php index 0cb0ff3352..7d6a4f0466 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Legend.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Legend.php @@ -209,7 +209,7 @@ class Legend implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Legend/Labels.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Legend/Labels.php index 960de236ef..c5f1352e47 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Legend/Labels.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Legend/Labels.php @@ -149,7 +149,7 @@ class Labels implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php index 6f638a06ad..37d605b248 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Plugins.php @@ -70,7 +70,7 @@ class Plugins implements ArraySerializableInterface, JsonSerializable * * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scale.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scale.php index da79f68a01..1c2f0f6bf5 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scale.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scale.php @@ -622,7 +622,7 @@ abstract class Scale implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales.php index 167b43e111..b0fd590b31 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales.php @@ -71,7 +71,7 @@ class Scales implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/GridLines.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/GridLines.php index 5af702fe8d..384a17f6f5 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/GridLines.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/GridLines.php @@ -332,7 +332,7 @@ class GridLines implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/ScaleLabel.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/ScaleLabel.php index b74a4a6220..52992a406b 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/ScaleLabel.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/ScaleLabel.php @@ -168,7 +168,7 @@ class ScaleLabel implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/Ticks.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/Ticks.php index 00991061b8..3f095b4c06 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/Ticks.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/Ticks.php @@ -389,7 +389,7 @@ class Ticks implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxis.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxis.php index cf1da92e46..04c63285d4 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxis.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxis.php @@ -64,7 +64,7 @@ class XAxis extends Scale /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxisCollection.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxisCollection.php index 1033e574b3..b54a733241 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxisCollection.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/XAxisCollection.php @@ -30,7 +30,7 @@ class XAxisCollection extends ArrayAccess implements ArraySerializableInterface, /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/YAxisCollection.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/YAxisCollection.php index dd28e0aa7f..4d1c807f57 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/YAxisCollection.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Scales/YAxisCollection.php @@ -30,7 +30,7 @@ class YAxisCollection extends ArrayAccess implements ArraySerializableInterface, /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Title.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Title.php index a90c216e07..64f8f09c58 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Title.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Title.php @@ -201,7 +201,7 @@ class Title implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips.php index fe76d8876c..2045222357 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips.php @@ -812,7 +812,7 @@ class Tooltips implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips/Callbacks.php b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips/Callbacks.php index f41ad08a63..23d6e091c4 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips/Callbacks.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/Tooltips/Callbacks.php @@ -319,7 +319,7 @@ class Callbacks implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/Options/WaterMark.php b/pandora_console/vendor/artica/phpchartjs/src/Options/WaterMark.php index 7587cf864f..170e16d186 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Options/WaterMark.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Options/WaterMark.php @@ -153,7 +153,7 @@ class WaterMark implements ArraySerializableInterface, JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->getArrayCopy(); } diff --git a/pandora_console/vendor/artica/phpchartjs/src/PluginsCollection.php b/pandora_console/vendor/artica/phpchartjs/src/PluginsCollection.php index 3e25aeecbc..b758dc5fac 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/PluginsCollection.php +++ b/pandora_console/vendor/artica/phpchartjs/src/PluginsCollection.php @@ -15,7 +15,7 @@ class PluginsCollection extends ArrayAccess implements JsonSerializable /** * @return array */ - public function jsonSerialize() + public function jsonSerialize():mixed { return $this->data; } From 59ef20e214baba6de3ba6720afee18738b0962b9 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 3 Aug 2023 10:56:28 +0200 Subject: [PATCH 3/4] #11739 Fixed date_format --- pandora_console/include/functions_config.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index afc0b41017..1b871d3c93 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2128,6 +2128,12 @@ function config_process_config() if (!isset($config['date_format'])) { config_update_value('date_format', 'F j, Y, g:i a'); + } else { + $config['date_format'] = str_replace( + ' ', + ' ', + $config['date_format'] + ); } if (!isset($config['event_view_hr'])) { From ddcfa02e6f608fec985ae61d365e1b4da6237278 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 3 Aug 2023 12:51:50 +0200 Subject: [PATCH 4/4] #11739 Fixed date_format 2 --- pandora_console/godmode/setup/setup_visuals.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index a7b64a67d7..cc5d026f35 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1772,7 +1772,9 @@ $table_other->data[$row][] = html_print_label_input_block( 100, true ).ui_print_input_placeholder( - __('Example').': '.date($config['date_format']), + __('Example').': '.date( + str_replace(' ', ' ', $config['date_format']) + ), true ) );