reset(); } function reset() { $this->path = array(); $this->snapshot = array(); } function add_current_page() { global $PHP_SELF, $request_type; // PHP 8.4 : Sécurisation des superglobales $get_vars = $_GET ?? array(); $post_vars = $_POST ?? array(); $set = 'true'; // Sécurisation du sizeof $path_count = is_array($this->path) ? count($this->path) : 0; for ($i=0; $i<$path_count; $i++) { if (isset($this->path[$i]['page']) && $this->path[$i]['page'] == basename($PHP_SELF)) { if ($this->path[$i]['get'] == $get_vars) { $set = 'false'; } } } if ($set == 'true') { $this->path[] = array( 'page' => basename($PHP_SELF), 'mode' => $request_type ?? 'NON_SET', 'get' => $get_vars, 'post' => $post_vars ); } } function remove_current_page() { global $PHP_SELF; $path_count = is_array($this->path) ? count($this->path) : 0; if ($path_count > 0) { $last_entry_position = $path_count - 1; if (isset($this->path[$last_entry_position]['page']) && $this->path[$last_entry_position]['page'] == basename($PHP_SELF)) { unset($this->path[$last_entry_position]); $this->path = array_values($this->path); // Réindexer le tableau } } } function set_snapshot($page = '') { global $PHP_SELF, $request_type; if (is_array($page)) { $this->snapshot = array( 'page' => $page['page'] ?? '', 'mode' => $page['mode'] ?? '', 'get' => $page['get'] ?? array(), 'post' => $page['post'] ?? array() ); } else { $this->snapshot = array( 'page' => basename($PHP_SELF), 'mode' => $request_type ?? '', 'get' => $_GET ?? array(), 'post' => $_POST ?? array() ); } } function clear_snapshot() { $this->snapshot = array(); } function get_all_get_params($exclude_array = array()) { if (!is_array($exclude_array)) $exclude_array = array(); $get_params = ''; if (isset($_GET) && is_array($_GET)) { foreach ($_GET as $key => $value) { if (!in_array($key, $exclude_array)) { // PHP 8.4 : On s'assure que $value est traitable comme string $get_params .= $key . '=' . (is_array($value) ? 'array' : $value) . '&'; } } } if (!empty($get_params)) $get_params = substr($get_params, 0, -1); return $get_params; }}?>
Fatal error: Uncaught Error: Class "navigationHistory" not found in /home/webocaz/public_html/includes/application_top.php:143
Stack trace:
#0 /home/webocaz/public_html/product_info.php(2): require()
#1 {main}
thrown in /home/webocaz/public_html/includes/application_top.php on line 143