ErrorException (E_NOTICE)

Par merciful, il y a 5 ans


Bonjour les amis,

Voila je rencontre un petit problème avec mon code.

Ce que je fais

Décrivez ici votre code ou ce que vous cherchez à faire

<?php namespace App; class Router{ /** * @var string */ private $viewPath; /** * @var AltoRouter */ public function __construct(string $viewPath) { $this->viewPath = $viewPath; $this->router = new \AltoRouter(); } public function get(string $url, string $view, ?string $name = null): self { $this->router->map('GET', $url, $view, $name); return $this; } public function url(string $name,array $params = []) { return $this->router->generate($name,$params); } public function run():self { $match = $this->router->match(); $view = $match[ 'target' ]; $router = $this->router; ob_start(); require $this->viewPath .DIRECTORY_SEPARATOR. $view . '.php'; $content = ob_get_clean(); require $this->viewPath .DIRECTORY_SEPARATOR. 'layouts/default.php'; return $this; } }

Ce que j'obtiens

Essayer d'accéder au décalage du tableau sur la valeur de type bool.

5 réponses

Carouge10, il y a 5 ans

bonjour.
et l'erreur complète est... ?

merciful, il y a 5 ans

Bonjour Courage10
voici ce que woops m'affiche :Essayer d'accéder au décalage du tableau sur la valeur de type bool.

Carouge10, il y a 5 ans

whoops te donne aussi une ligne d'erreur

merciful, il y a 5 ans

VOICI ce que j'ai d'acvantage stp :" Tentative d'accès au décalage du tableau sur la valeur de type booléen"

merciful, il y a 5 ans

Voici ce que le terminal m'affiche
Closed without sending a request; it was probably just an unused speculative preconnection