Commit 20755b66 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction migration PHP 8.0, forcer le type string pour les attributs passés...

Correction migration PHP 8.0, forcer le type string pour les attributs passés à \Laminas\View\Helper\AbstractHtmlElement::htmlAttribs, car strpos n'autorise plus le type string dans le needle depuis php 8.0
parent b36a70e9
Loading
Loading
Loading
Loading
+8 −1
Changes for module/Application/src/Util.php: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -39,6 +39,13 @@ class Util
        $result          = array_merge($attribs1, $attribs2);
        $result['class'] = array_unique($classes);

        foreach ($result as $att => $value) {
            if (is_int($value)) {
                $result[$att] = (string)$value;
            }
        }


        return $result;
    }

@@ -129,7 +136,7 @@ class Util
     */
    static public function routeToActionResource($route)
    {
        list($controller, $action) = self::routeToControllerAction($route);
        [$controller, $action] = self::routeToControllerAction($route);

        if (!$controller || !$action) {
            throw new \LogicException('Les contrôleur et action de la route "' . $route . '" n\'ont pas pu être calculées.');