PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | libraries/adapter/editor/editor.php +16 -2 1.6.4 → 1.8.16 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * @package VikWP - Libraries
4 4 * @subpackage adapter.editor
5 5 * @author E4J s.r.l.
6 - * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
6 + * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
7 7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 8 * @link https://vikwp.com
9 9 */
10 10
@@ -98,13 +98,27 @@
98 98 * @link https://codex.wordpress.org/Function_Reference/wp_editor
99 99 */
100 100 public function display($name, $html, $width, $height, $col, $row, $buttons = true, $id = null, $params = array())
101 101 {
102 + /**
103 + * Since the Joomla `JEditor` interface supports other 2 arguments between $id and $params ($asset and $author),
104 + * we should assume that the $params array has been provided has last element whenever the total number of
105 + * received arguments is equals or higher than 9.
106 + *
107 + * @since 10.1.48
108 + */
109 + $args = func_get_args();
110 +
111 + if (count($args) >= 9)
112 + {
113 + $params = end($args);
114 + }
115 +
102 116 $id = preg_replace("/[^a-zA-Z0-9_]+/", '_', $id ? $id : $name);
103 117
104 118 ob_start();
105 119
106 - $this->render($name, $html, $width, $height, $col, $row, $buttons, $id, $params);
120 + $this->render($name, (string) $html, $width, $height, $col, $row, $buttons, $id, $params);
107 121
108 122 $output = ob_get_contents();
109 123 ob_end_clean();
110 124