mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
parent
13e3cf6c0d
commit
64df3c5538
8 changed files with 47 additions and 47 deletions
|
@ -332,7 +332,7 @@ if ($tor_reged && $tor_info) {
|
|||
$sp_up_tot[$x] += $peer['speed_up'];
|
||||
$sp_down_tot[$x] += $peer['speed_down'];
|
||||
|
||||
$guest = ($peer['user_id'] == GUEST_UID || is_null($peer['username']));
|
||||
$guest = ($peer['user_id'] == GUEST_UID || null === $peer['username']);
|
||||
$p_max_up = $peer['uploaded'];
|
||||
$p_max_down = $peer['downloaded'];
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ function attach_mod_sql_build_array($query, $assoc_ary = false)
|
|||
foreach ($assoc_ary as $key => $var) {
|
||||
$fields[] = $key;
|
||||
|
||||
if (is_null($var)) {
|
||||
if (null === $var) {
|
||||
$values[] = 'NULL';
|
||||
} elseif (is_string($var)) {
|
||||
$values[] = "'" . attach_mod_sql_escape($var) . "'";
|
||||
|
@ -584,7 +584,7 @@ function attach_mod_sql_build_array($query, $assoc_ary = false)
|
|||
foreach ($assoc_ary as $id => $sql_ary) {
|
||||
$values = array();
|
||||
foreach ($sql_ary as $key => $var) {
|
||||
if (is_null($var)) {
|
||||
if (null === $var) {
|
||||
$values[] = 'NULL';
|
||||
} elseif (is_string($var)) {
|
||||
$values[] = "'" . attach_mod_sql_escape($var) . "'";
|
||||
|
@ -599,7 +599,7 @@ function attach_mod_sql_build_array($query, $assoc_ary = false)
|
|||
} elseif ($query == 'UPDATE' || $query == 'SELECT') {
|
||||
$values = array();
|
||||
foreach ($assoc_ary as $key => $var) {
|
||||
if (is_null($var)) {
|
||||
if (null === $var) {
|
||||
$values[] = "$key = NULL";
|
||||
} elseif (is_string($var)) {
|
||||
$values[] = "$key = '" . attach_mod_sql_escape($var) . "'";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue