Jacek Kowalski
2020-11-13 729413a7b10f1b27a810a4928b1ee165a9961d9e
VehicleTypes: convert vehicle id to integer before looking it up
1 files modified
3 ■■■■ changed files
lib/VehicleTypes.php 3 ●●●● patch | view | raw | blame | history
lib/VehicleTypes.php
@@ -17,8 +17,9 @@
    }
    
    public function getByNumber($id) {
        $id = intval($id, 10);
        return $this->typesByNumber[$id] ?? [
            'num' => '??'.$id,
            'num' => '??' . str_pad($id, 3, '0', STR_PAD_LEFT),
            'type' => '?',
            'low' => NULL,
        ];