mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Fixed the PHP warnings that burns the file systems. TICKET: #3054
(cherry picked from commit a5f8a9ca24f76c7e1b87f6b1b3cefc568c4fa141)
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
|
// 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().
|
// 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) {
|
if (! $connect_id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2546,10 +2546,17 @@
|
|||||||
return($Scale);
|
return($Scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mod_check($x, $y) {
|
||||||
|
return @($x % $y) === FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
function modulo($Value1,$Value2)
|
function modulo($Value1,$Value2)
|
||||||
{
|
{
|
||||||
if (floor($Value1) == 0) { return(0); }
|
if (floor($Value1) == 0) { return(0); }
|
||||||
if (floor($Value2) == 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); }
|
if (floor($Value2) != 0) { return($Value1 % $Value2); }
|
||||||
|
|
||||||
$MinValue = min($Value1,$Value2); $Factor = 10;
|
$MinValue = min($Value1,$Value2); $Factor = 10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user