Overview
Comment:Change some exceptions types
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 33bc233c9980468e7413d23d16629b57c3d4edde9628793ab163efb481321f08
User & Date: bohwaz on 2022-11-20 01:47:54
Other Links: branch diff | manifest | tags
Context
2022-11-20
02:04
Add keep parameter to include to be able to send variables to parent skeleton check-in: 45e169e77f user: bohwaz tags: dev
01:47
Change some exceptions types check-in: 33bc233c99 user: bohwaz tags: dev
01:47
Add body tag to error HTML page check-in: eed660496c user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Utils.php from [d0c16ac5a0] to [83f5119d44].

717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732





733
734
735
736
737
738
739
740
741
742
743
744

        return $url;
    }

    static public function iconUnicode(string $shape): string
    {
        if (!isset(self::ICONS[$shape])) {
            throw new \InvalidArgumentException('Unknown icon shape: ' . $shape);
        }

        return self::ICONS[$shape];
    }

    static public function array_transpose(array $array): array
    {
        $out = [];





        $max = 0;

        foreach ($array as $rows) {
            if (!is_array($rows)) {
                throw new \InvalidArgumentException('Invalid multi-dimensional array: not an array: ' . gettype($rows));
            }

            $max = max($max, count($rows));
        }

        foreach ($array as $column => $rows) {
            // Match number of rows of largest sub-array, in case there is a missing row in a column







|





|


>
>
>
>
>




|







717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749

        return $url;
    }

    static public function iconUnicode(string $shape): string
    {
        if (!isset(self::ICONS[$shape])) {
            throw new \UnexpectedValueException('Unknown icon shape: ' . $shape);
        }

        return self::ICONS[$shape];
    }

    static public function array_transpose(?array $array): array
    {
        $out = [];

        if (!$array) {
            return $out;
        }

        $max = 0;

        foreach ($array as $rows) {
            if (!is_array($rows)) {
                throw new \UnexpectedValueException('Invalid multi-dimensional array: not an array: ' . gettype($rows));
            }

            $max = max($max, count($rows));
        }

        foreach ($array as $column => $rows) {
            // Match number of rows of largest sub-array, in case there is a missing row in a column