Issues (13)

bin/change_ip.php (1 issue)

Labels
Severity
1
<?php
2
include '../src/Cpanel.php';
3
$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]);
4
5
6
$oldip = '__SOURCEIP__';
7
$newip = '__DESTINATIONIP__';
8
9
$response = (array) $cpl->changeip(
10
	[
11
		'oldip' => $oldip,
12
		'newip' => $newip
13
	]
14
);
15
16
var_export($response).PHP_EOL;
0 ignored issues
show
Are you sure the usage of var_export($response) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
17