phpmyadmin / motranslator
Showing 1 of 1 files from the diff.

@@ -77,6 +77,10 @@
Loading
77 77
    public function readint(string $unpack, int $pos): int
78 78
    {
79 79
        $data = unpack($unpack, $this->read($pos, 4));
80 +
        if ($data === false) {
81 +
            return PHP_INT_MAX;
82 +
        }
83 +
80 84
        $result = $data[1];
81 85
82 86
        /* We're reading unsigned int, but PHP will happily
@@ -99,6 +103,11 @@
Loading
99 103
     */
100 104
    public function readintarray(string $unpack, int $pos, int $count): array
101 105
    {
102 -
        return unpack($unpack . $count, $this->read($pos, 4 * $count));
106 +
        $data = unpack($unpack . $count, $this->read($pos, 4 * $count));
107 +
        if ($data === false) {
108 +
            return [];
109 +
        }
110 +
111 +
        return $data;
103 112
    }
104 113
}
Files Complexity Coverage
src 79 99.25%
Project Totals (4 files) 79 99.25%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading