GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b79b58...ea0e22 )
by Marco
04:53
created

relist.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
require_once('config.php');
3
require_once('function.php');
4
$typedesc=$_POST['type'];
5
$type = $tables["$typedesc"]['field'];
6
$table = ($tables["$typedesc"]['milter']) ? milterTable($type) : $tables["$typedesc"]['name'];
7
$cl = ($tables["$typedesc"]['milter']) ? 10 : 9;
8
?>
9
<td colspan="<?php echo $cl; ?>" style="text-align: center">
10
<?php
11
openlog($tag, LOG_PID, $fac);
12
if (empty($_POST['reason'])) die ("Specify a reason, please!</td>");
13 View Code Duplication
if (preg_match( '/[^\x20-\x7f]/', $_POST['reason']))
14
        exit('ERROR: &lt;'.htmlentities($_POST['reason'],ENT_COMPAT | ENT_HTML401, 'ISO-8859-1').'&gt; contains NON ASCII chars.</td>');
15
$user = username();
16
17 View Code Duplication
if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
                exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
19
20
if (isFull($mysqli,$typedesc,$tables)) die("ERROR in relist: ".htmlspecialchars("$typedesc has reached maximum value of ".$tables["$typedesc"]['limit'].' listed items.') );
21
if (relist ($mysqli,username(),$_POST['value'],$type,$table,$_POST['unit'],$_POST['quantity'],$_POST['reason']))
22
 print 'OK '.$_POST["type"].' &lt;'.$_POST['value'].'&gt; relisted for '.$_POST['quantity'].$_POST['unit'];
23
else
24
 print 'ERROR in relist; check log';
25
$mysqli->close();
26
closelog();
27
print '</td>';
28
?>
29