Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-3519

Code cleanup: Missing Default Case

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Should have Should have
    • 1.53
    • 2
    • Code Refactoring
    • Sprint #87

      The switch statement has no default case. This can lead to logical errors when the defined cases do not handle all possibilities. Thus, further code can lead to errors or vulnerabilities.

      classes/class-p4-search.php Line: 376

      switch ($filter['id']) {
      

      classes/class-p4-search.php Line: 351

      switch ($type) {
      

      classes/class-p4-search.php Line: 541

      switch ($type) {
      

      classes/class-p4-elasticsearch.php Line: 28

      switch ($filter['id']) {
      

      classes/class-p4-elasticsearch.php Line: 26

      switch ($type) {
      

            atheodor Angelos Theodorakopoulos (Inactive)
            kkokkoro Konstantinos Kokkorogiannis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: