rathena / FluxCP

Detected use of @ to suppress errors PHP-W1078
Bug risk
Critical
36 occurrences in this check
Errors should not be suppressed
165						<tr>
166							<td bgcolor="#f5f5f5"></td>
167							<td bgcolor="#f5f5f5">
168								<?php if (Flux::config('DebugMode') && @gethostbyname(Flux::config('ServerAddress')) == '127.0.0.1'): ?>169									<p class="notice">Please change your <strong>ServerAddress</strong> directive in your application config to your server's real address (e.g., myserver.com).</p>
170								<?php endif ?>
171								
Errors should not be suppressed
39    <div class="container">
40		<?php //include 'main/sidebar.php' ?>
41		<?php //include 'main/loginbox.php' ?>
42		<?php if (Flux::config('DebugMode') && @gethostbyname(Flux::config('ServerAddress')) == '127.0.0.1'): ?>43			<p class="notice">Please change your <strong>ServerAddress</strong> directive in your application config to your server's real address (e.g., myserver.com).</p>
44		<?php endif ?>
45
Errors should not be suppressed
 10    $itemInfo = FLUX_ROOT . '/itemInfo.lua';
 11    $is_loaded = $fileLoad->load($files->get('iteminfo'), $itemInfo);
 12    if($is_loaded === true) {
 13        $fp = @fopen($itemInfo, 'r');  14        if($fp){ $array = explode("\n", fread($fp, filesize($itemInfo))); }
 15        fclose($fp);
 16        $ca = count($array);
Errors should not be suppressed
14			}
15			// Attempt to unlink the directory, but let's not display an error if
16			// there are still files in it.
17			@rmdir($dbDir);18		}
19	}
20	
Errors should not be suppressed
81		else {
82			require_once 'functions/imagecreatefrombmpstring.php';
83			
84			$data  = @gzuncompress(pack('H*', $res->emblem_data));85			$image = imagecreatefrombmpstring($data);
86			
87			header("Content-Type: image/png");
Errors should not be suppressed
43		elseif (file_exists($filename) && (time() - filemtime($filename)) < $interval) {
44			header("Content-Type: image/png");
45			header('Content-Length: '.filesize($filename));
46			@readfile($filename);47			exit;
48		}
49	}
Errors should not be suppressed
 857    $rm_tags = array_shift($tag_list);
 858    @array_walk($tag_list, 'tln_casenormalize');
 859    @array_walk($rm_tags_with_content, 'tln_casenormalize');
 860    @array_walk($self_closing_tags, 'tln_casenormalize'); 861    /**
 862     * See if tag_list is of tags to remove or tags to allow.
 863     * false  means remove these tags
Errors should not be suppressed
 856     */
 857    $rm_tags = array_shift($tag_list);
 858    @array_walk($tag_list, 'tln_casenormalize');
 859    @array_walk($rm_tags_with_content, 'tln_casenormalize'); 860    @array_walk($self_closing_tags, 'tln_casenormalize');
 861    /**
 862     * See if tag_list is of tags to remove or tags to allow.
Errors should not be suppressed
 855     * Normalize rm_tags and rm_tags_with_content.
 856     */
 857    $rm_tags = array_shift($tag_list);
 858    @array_walk($tag_list, 'tln_casenormalize'); 859    @array_walk($rm_tags_with_content, 'tln_casenormalize');
 860    @array_walk($self_closing_tags, 'tln_casenormalize');
 861    /**
Errors should not be suppressed
1094            $endtime = time() + $this->Timelimit;
1095        }
1096        while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
1097            $str = @fgets($this->smtp_conn, 515);1098            $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
1099            $this->edebug("SMTP -> get_lines(): \$str is  \"$str\"", self::DEBUG_LOWLEVEL);
1100            $data .= $str;
Errors should not be suppressed
 335            $max = ini_get('max_execution_time');
 336            // Don't bother if unlimited
 337            if ($max != 0 && $timeout > $max) {
 338                @set_time_limit($timeout); 339            }
 340            stream_set_timeout($this->smtp_conn, $timeout, 0);
 341        }
Errors should not be suppressed
299        //The QUIT command may cause the daemon to exit, which will kill our connection
300        //So ignore errors here
301        try {
302            @fclose($this->pop_conn);303        } catch (Exception $e) {
304            //Do nothing
305        };
Errors should not be suppressed
3276    {
3277        // Set the time zone to whatever the default is to avoid 500 errors
3278        // Will default to UTC if it's not set properly in php.ini
3279        date_default_timezone_set(@date_default_timezone_get());3280        return date('D, j M Y H:i:s O');
3281    }
3282
Errors should not be suppressed
3035     */
3036    public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
3037    {
3038        if (!@is_file($path)) {3039            $this->setError($this->lang('file_access') . $path);
3040            return false;
3041        }
Errors should not be suppressed
2510    public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
2511    {
2512        try {
2513            if (!@is_file($path)) {2514                throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);
2515            }
2516
Errors should not be suppressed
2390                    $body = $parts[1];
2391                } else {
2392                    @unlink($file);
2393                    @unlink($signed);2394                    throw new phpmailerException($this->lang('signing') . openssl_error_string());
2395                }
2396            } catch (phpmailerException $exc) {
Errors should not be suppressed
2389                    $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE;
2390                    $body = $parts[1];
2391                } else {
2392                    @unlink($file);2393                    @unlink($signed);
2394                    throw new phpmailerException($this->lang('signing') . openssl_error_string());
2395                }
Errors should not be suppressed
2383                if ($sign) {
2384                    @unlink($file);
2385                    $body = file_get_contents($signed);
2386                    @unlink($signed);2387                    //The message returned by openssl contains both headers and body, so need to split them up
2388                    $parts = explode("\n\n", $body, 2);
2389                    $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE;
Errors should not be suppressed
2381                    );
2382                }
2383                if ($sign) {
2384                    @unlink($file);2385                    $body = file_get_contents($signed);
2386                    @unlink($signed);
2387                    //The message returned by openssl contains both headers and body, so need to split them up
Errors should not be suppressed
2370                        null
2371                    );
2372                } else {
2373                    $sign = @openssl_pkcs7_sign(2374                        $file,
2375                        $signed,
2376                        'file://' . realpath($this->sign_cert_file),
Errors should not be suppressed
2362                $signed = tempnam(sys_get_temp_dir(), 'signed');
2363                //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
2364                if (empty($this->sign_extracerts_file)) {
2365                    $sign = @openssl_pkcs7_sign(2366                        $file,
2367                        $signed,
2368                        'file://' . realpath($this->sign_cert_file),
Errors should not be suppressed
1407                }
1408            }
1409        } else {
1410            if (!@$mail = popen($sendmail, 'w')) {1411                throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1412            }
1413            fputs($mail, $header);
Errors should not be suppressed
1386
1387        if ($this->SingleTo) {
1388            foreach ($this->SingleToArray as $toAddr) {
1389                if (!@$mail = popen($sendmail, 'w')) {1390                    throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
1391                }
1392                fputs($mail, 'To: ' . $toAddr . "\n");
Errors should not be suppressed
1188            ($pos = strrpos($address, '@')) !== false) {
1189            $domain = substr($address, ++$pos);
1190            // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
1191            if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) {1192                $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);
1193                if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ?
1194                    idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) :
Errors should not be suppressed
 699        if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
 700            $result = @mail($to, $subject, $body, $header);
 701        } else {
 702            $result = @mail($to, $subject, $body, $header, $params); 703        }
 704        return $result;
 705    }