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
Branch master (eb5762)
by Marco
05:09 queued 02:37
created

remove.php (2 issues)

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"]['name'];
7
8
openlog($tag, LOG_PID, $fac);
9
$user = username();
10
$mysqli = new mysqli($dbhost, $userdb, $pwd, $db, $dbport);
11 View Code Duplication
if ($mysqli->connect_error) {
12
	syslog (LOG_EMERG, $user.': Connect Error (' . $mysqli->connect_errno . ') '
13
                    . $mysqli->connect_error);
14
        die($user.': Connect Error (' . $mysqli->connect_errno . ') '
15
                    . $mysqli->connect_error);
16
}
17
syslog (LOG_INFO, $user.': Successfully connected to ' . $mysqli->host_info );
18
19 View Code Duplication
if (remove ($_POST['value'],$type,$table))
0 ignored issues
show
The call to remove() misses some required arguments starting with $type.
Loading history...
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...
20
 print 'OK '.$typedesc.' &lt;'.$_POST['value'].'&gt; permanently REMOVED!';
21
else
22
 print 'Delete operation ERROR on '.$typedesc.' &lt;'.$_POST['value'].'&gt;; check log.';
23
$mysqli->close();
24
closelog();
25
?>
26