Code Duplication    Length = 6-6 lines in 3 locations

addTicket.php 1 location

@@ 409-414 (lines=6) @@
406
            }
407
        }
408
409
        if(!empty($errors)){
410
            $_xhelpSession->set('xhelp_validateError', $fields);
411
            $message = _XHELP_MESSAGE_VALIDATE_ERROR;
412
            header("Location: ".XHELP_BASE_URL."/addTicket.php");
413
            exit();
414
        }
415
416
        //$hTicket =& xhelpGetHandler('ticket');
417
        $ticket =& $hTicket->create();

anon_addTicket.php 1 location

@@ 276-281 (lines=6) @@
273
        }
274
    }
275
276
    if(!empty($errors)){
277
        $_xhelpSession->set('xhelp_validateError', $fields);
278
        $message = _XHELP_MESSAGE_VALIDATE_ERROR;
279
        header("Location: ".XHELP_BASE_URL."/anon_addTicket.php");
280
        exit();
281
    }
282
283
    //Check email address
284
    $user_added = false;

ticket.php 1 location

@@ 493-498 (lines=6) @@
490
                }
491
            }
492
493
            if(!empty($errors)){
494
                $_xhelpSession->set('xhelp_validateError', $fields);
495
                $message = _XHELP_MESSAGE_VALIDATE_ERROR;
496
                header("Location: ".XHELP_BASE_URL."/ticket.php?id=$xhelp_id&op=edit");
497
                exit();
498
            }
499
500
            $oldTicket = array('id'=>$ticketInfo->getVar('id'),
501
                               'subject'=>$ticketInfo->getVar('subject', 'n'),