Fixed the PHP warnings that burns the file systems. TICKET: #3054
(cherry picked from commit a5f8a9ca24
)
This commit is contained in:
parent
d192bb0a1a
commit
a004bf6dc2
|
@ -30,7 +30,7 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||
|
||||
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
||||
// If you want persistent connections change it to mysql_pconnect().
|
||||
$connect_id = mysql_connect($host . ":" . $port, $user, $pass, true);
|
||||
$connect_id = @mysql_connect($host . ":" . $port, $user, $pass, true);
|
||||
if (! $connect_id) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2546,10 +2546,17 @@
|
|||
return($Scale);
|
||||
}
|
||||
|
||||
function mod_check($x, $y) {
|
||||
return @($x % $y) === FALSE;
|
||||
}
|
||||
|
||||
function modulo($Value1,$Value2)
|
||||
{
|
||||
if (floor($Value1) == 0) { return(0); }
|
||||
if (floor($Value2) == 0) { return(0); }
|
||||
if (is_infinite($Value2)) { return(0); }
|
||||
if ($Value2 == 0.0) { return(0); }
|
||||
if ($this->mod_check($Value1, $Value2)) { return(0); }
|
||||
if (floor($Value2) != 0) { return($Value1 % $Value2); }
|
||||
|
||||
$MinValue = min($Value1,$Value2); $Factor = 10;
|
||||
|
|
Loading…
Reference in New Issue