XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Avoid deeply nested control flow statements.
Open

                                for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
                                    $paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
                                    for ($i = 7; $i >= 0; $i--) {
                                        $paletteindex                     = ($paletteindexbyte & (0x01 << $i)) >> $i;
                                        $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
Severity: Major
Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        for ($i = 0; $i < $firstbyte; $i++) {
                                            $col                              = $pixelcounter % $thisfile_bmp_header_raw['width'];
                                            $row                              = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']);
                                            $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindexes[$i % 2]];
                                            $pixelcounter++;
    Severity: Major
    Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                              if (preg_match('# \\-crop "([0-9]+)x([0-9]+)\\+0\\+0" #', $commandline, $matches)) {
                                                  $commandline = str_replace(' -crop "' . $matches[1] . 'x' . $matches[2] . '+0+0" ',
                                                                             ' -crop ' . phpthumb_functions::escapeshellarg_replacement(($matches[1] - (2 * $width))
                                                                                                                                        . 'x'
                                                                                                                                        . ($matches[2] - (2 * $width))
      Severity: Major
      Found in thumbs/phpthumb.class.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        while (($pixeldataoffset % 4) != 0) {
                                            // lines are padded to nearest DWORD
                                            $pixeldataoffset++;
                                        }
        Severity: Major
        Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if (strlen($imgdata) <= $this->maxb) {
                                          imagetruecolortopalette($this->gdimg_output, true, pow(2, $i));
                                          break;
                                      }
          Severity: Major
          Found in thumbs/phpthumb.class.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            while (($pixeldataoffset % 4) != 0) {
                                                // lines are padded to nearest DWORD
                                                $pixeldataoffset++;
                                            }
            Severity: Major
            Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              while (($pixeldataoffset % 4) != 0) {
                                                  // lines are padded to nearest DWORD
                                                  $pixeldataoffset++;
                                              }
              Severity: Major
              Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                while (($pixeldataoffset % 4) != 0) {
                                                    // lines are padded to nearest DWORD
                                                    $pixeldataoffset++;
                                                }
                Severity: Major
                Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                      for ($i = 0; $i < $firstbyte; $i++) {
                                                          $col                              = $pixelcounter % $thisfile_bmp_header_raw['width'];
                                                          $row                              = $thisfile_bmp_header_raw['height'] - 1 - (($pixelcounter - $col) / $thisfile_bmp_header_raw['width']);
                                                          $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$secondbyte];
                                                          $pixelcounter++;
                  Severity: Major
                  Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
                                                        $thisfile_bmp['data'][$row][$col] = (ord($BMPpixelData{$pixeldataoffset + 2}) << 16)
                                                                                            | (ord($BMPpixelData{$pixeldataoffset + 1}) << 8)
                                                                                            | ord($BMPpixelData{$pixeldataoffset});
                                                        $pixeldataoffset                  += 3;
                    Severity: Major
                    Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
                                                          $thisfile_bmp['data'][$row][$col] = (ord($BMPpixelData{$pixeldataoffset + 3}) << 24)
                                                                                              | (ord($BMPpixelData{$pixeldataoffset + 2}) << 16)
                                                                                              | (ord($BMPpixelData{$pixeldataoffset + 1}) << 8)
                                                                                              | ord($BMPpixelData{$pixeldataoffset});
                      Severity: Major
                      Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        while (($pixeldataoffset % 4) != 0) {
                                                            // lines are padded to nearest DWORD
                                                            $pixeldataoffset++;
                                                        }
                        Severity: Major
                        Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col = $col) {
                                                              $paletteindexbyte = ord($BMPpixelData{$pixeldataoffset++});
                                                              for ($i = 1; $i >= 0; $i--) {
                                                                  $paletteindex                     = ($paletteindexbyte & (0x0F << (4 * $i))) >> (4 * $i);
                                                                  $thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
                          Severity: Major
                          Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            while (($pixeldataoffset % 4) != 0) {
                                                                // lines are padded to nearest DWORD
                                                                $pixeldataoffset++;
                                                            }
                            Severity: Major
                            Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  switch ($secondbyte) {
                                                                      case 0:
                                                                          // end of line
                                                                          // no need for special processing, just ignore
                                                                          break;
                              Severity: Major
                              Found in thumbs/phpthumb.bmp.php - About 45 mins to fix

                                Method Frame has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function Frame(&$gdimg, $frame_width, $edge_width, $hexcolor_frame, $hexcolor1, $hexcolor2)
                                Severity: Minor
                                Found in thumbs/phpthumb.filters.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if ($imagetypes & IMG_GIF) {
                                                          $gd_info['GIF Create Support'] = true;
                                                      }
                                  Severity: Major
                                  Found in thumbs/phpthumb.functions.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if ($imagetypes & IMG_JPG) {
                                                            $gd_info['JPG Support'] = true;
                                                        }
                                    Severity: Major
                                    Found in thumbs/phpthumb.functions.php - About 45 mins to fix

                                      Method URLreadFsock has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = 80, $timeout = 10)
                                      Severity: Minor
                                      Found in thumbs/phpthumb.functions.php - About 45 mins to fix

                                        Method DropShadow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            public function DropShadow(&$gdimg, $distance, $width, $hexcolor, $angle, $alpha)
                                        Severity: Minor
                                        Found in thumbs/phpthumb.filters.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language