Errors should not be suppressed
38{
39 try {
40 $file = dirname(__FILE__). '/../nubuilder4.sql';
41 @$handle = fopen($file, "r"); 42 $temp = "";
43 if ($handle) {
44 dropObject('zzzzsys_debug', ['TABLE']);
Errors should not be suppressed
11 }
12 }
13 $file = __DIR__."/../nubuilder4.sql";
14 @$handle = fopen($file, "r");15 $temp = "";
16 if ($handle) {
17 while (($line = fgets($handle)) !== false) {
Errors should not be suppressed
1023
1024function nuIsFile($i)
1025{
1026 $file_headers = @get_headers($i);1027
1028 if ($file_headers[0] == 'HTTP/1.0 404 Not Found') {
1029 return false;
Errors should not be suppressed
124 }
125
126 $client = @$_SERVER['HTTP_CLIENT_IP'];
127 $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];128 $remote = $_SERVER['REMOTE_ADDR'];
129
130 if (filter_var($client, FILTER_VALIDATE_IP)) {
Description
Suppressing errors using an error control operator(@
) is discouraged. Instead of ignoring the raised error, it should be fixed accordingly.
Bad practice
$user = ['name' => 'John', 'age' => 23];
echo @$user['city'];
Recommended
$user = ['name' => 'John', 'age' => 23];
if (isset($user['city'])) {
echo $user['city'];
}