Issues (994)

etc/server/msisdn.php (1 issue)

Labels
Severity
1
<?php
2
3
$pdo = pdo()->select('data_msisdn', 'msisdn');
4
if (isset($_REQUEST['simcard'])) {
5
  $pdo->where(['simcard' => strtolower($_REQUEST['simcard'])]);
6
}
7
$row = $pdo->row_array();
8
$row = array_map(function ($db) {
9
  if (isset($db['msisdn'])) {
10
    if (strlen($db['msisdn']) <= 7) return;
11
    return $db['msisdn'];
12
  }
13
}, $row);
0 ignored issues
show
It seems like $row can also be of type null; however, parameter $array of array_map() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
}, /** @scrutinizer ignore-type */ $row);
Loading history...
14
$row = array_unique(array_values(array_filter($row)));
15
\JSON\json::json($row);
16