e107inc/e107

View on GitHub

Showing 571 of 6,975 total issues

Consider simplifying this complex logical expression.
Open

        if((strpos($eng_line,"[link=")!==FALSE && strpos($trans_line,"[link=")===FALSE) || (strpos($eng_line,"[b]")!==FALSE && strpos($trans_line,"[b]")===FALSE))
        {
            $error[] = $def. ": ".LAN_CHECK_30;
        }
        elseif((strpos($eng_line,"[")!==FALSE && strpos($trans_line,"[")===FALSE) || (strpos($eng_line,"]")!==FALSE && strpos($trans_line, "]")===FALSE))
Severity: Major
Found in e107_admin/lancheck.php - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                    if($this->VerifyResultLines($connection,"220")>0
                    && $this->PutLine($connection,"HELO $localhost")
                    && $this->VerifyResultLines($connection,"250")>0
                    && $this->PutLine($connection,"MAIL FROM: <$localuser@$localhost>")
                    && $this->VerifyResultLines($connection,"250")>0
    Severity: Major
    Found in e107_handlers/mail_validation_class.php - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if(($file != '.') && ($file != '..') && !in_array($file, $this->dirFilter) && !in_array($file, $omit) && is_dir($path . '/' . $file) && ($fmask == '' || preg_match("#" . $fmask . "#", $file)))
                  {
                      $ret[] = $file;
                  }
      Severity: Major
      Found in e107_handlers/file_class.php - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                                            if (preg_match("#\<object\s*?mime\=[\"\']image\/.*?\>(.*?)\<\/object\>#si", $match[1][$a], $fmatch))
                                            {
                                                $e_file = $fmatch[1];
        //                              echo "xep-0038 file: ".$e_file."<br />";
                                                // Pull out all match strings - need to pick out any language definitions for posterity
        Severity: Major
        Found in e107_admin/emoticon.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if(!empty($sublinkArray))
                                      {
                                          $this->eLinkList['sub_'.$row['link_id']] = $sublinkArray;
                                      }
          Severity: Major
          Found in e107_handlers/sitelinks_class.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (e107::callMethod($cls, 'bounce', $bounceInfo) === false)
                                            {
                                                e107::getLog()->add($plug . ' bounce process failed', $bounceInfo, E_LOG_FATAL, 'BOUNCE', LOG_TO_ROLLING);
                                            }
            Severity: Major
            Found in e107_handlers/mail_manager_class.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if (!array_key_exists(strtolower($fext),$this->allowed_types) )
                                          {
                                              if ($file == 'index.html' || $file == "null.txt")
                                              {
                                                  if (filesize($dir.'/'.$file))
              Severity: Major
              Found in e107_admin/admin.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if ($imageHeight > $allowedHeight)
                                    {
                                        if (strlen($sBadImage))
                                        {
                                            $sBadImage .= ', ';
                Severity: Major
                Found in e107_admin/image.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if($sql->gen("DESCRIBE " . MPREFIX . $table_list))
                                      {
                                          while($row3 = $sql->fetch())
                                          {
                                              $field_name = $row3['Field'];
                  Severity: Major
                  Found in e107_admin/users_extended.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if($sql->gen("DESCRIBE " . MPREFIX . "{$table_list}"))
                                        {
                                            while($row3 = $sql->fetch())
                                            {
                                                $field_name = $row3['Field'];
                    Severity: Major
                    Found in e107_admin/users_extended.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if (UH_DEBUG)
                                              {
                                                  e107::getLog()->addEvent(10, __FILE__."|".__FUNCTION__."@".__LINE__, "DEBUG", "Upload Handler test", "Move {$tempfilename} to {$uploadfile} ", FALSE, LOG_TO_ROLLING);
                                              }
                      Severity: Major
                      Found in e107_handlers/upload_handler.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ($imageWidth > $allowedWidth)
                                            {
                                                $sBadImage = IMALAN_40." ($imageWidth)";
                                            }
                        Severity: Major
                        Found in e107_admin/image.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if($sql->gen("DESCRIBE " . MPREFIX . "{$table_list}"))
                                              {
                                                  while($row3 = $sql->fetch())
                                                  {
                                                      $field_name = $row3['Field'];
                          Severity: Major
                          Found in e107_admin/users_extended.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ($nid != $udata['user_baseclasslist'])
                                                    {
                                                        if (US_DEBUG)
                                                        {
                                                            e107::getLog()->addEvent(10, debug_backtrace(), "DEBUG", "Usersettings test", "Write back classes; old list: {$udata['user_class']}; new list: ".$nid, false, LOG_TO_ROLLING);
                            Severity: Major
                            Found in usersettings.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if (strpos($lbrks, $sp[$i - 1]) !== false)
                                                                  {
                                                                      break;
                                                                  }
                              Severity: Major
                              Found in e107_handlers/e_parse_class.php - About 45 mins to fix

                                Method form_textarea has 9 arguments (exceeds 7 allowed). Consider refactoring.
                                Open

                                    public function form_textarea($form_name, $form_columns, $form_rows, $form_value, $form_js = '', $form_style = '', $form_wrap = '', $form_readonly = '', $form_tooltip = '') {
                                Severity: Major
                                Found in e107_handlers/form_handler.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              switch($data['method'])
                                                              {
                                                                  //returns array('caption'=>'', 'text'=>'');
                                                                  case 'form':
                                                                      if(method_exists($class, "event_{$data['method']}"))
                                  Severity: Major
                                  Found in e107_handlers/event_class.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if($rule->allowVars)
                                                                {
                                                                    foreach ($rule->allowVars as $key) 
                                                                    {
                                                                        if(isset($_GET[$key]) && !$request->isRequestParam($key))
                                    Severity: Major
                                    Found in e107_handlers/application.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                          while (!$found && (count($code_stack) != 0))
                                                                          {
                                                                              switch ($code_stack[0]['type'])
                                                                              {
                                                                                  case 'text' :
                                      Severity: Major
                                      Found in e107_handlers/bbcode_handler.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                            while ($i > 0) { $unmatch_stack[] = array_shift($code_stack); $i--; }    // Get required code to top of stack
                                        Severity: Major
                                        Found in e107_handlers/bbcode_handler.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language