mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix array
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ foreach (array("passkey","info_hash","peer_id","event") as $x)
|
||||
// get integer type port, downloaded, uploaded, left from client
|
||||
foreach (array("port","downloaded","uploaded","left","compact","no_peer_id") as $x)
|
||||
{
|
||||
$GLOBALS[$x] = $_GET[$x] ?? 0;
|
||||
$GLOBALS[$x] = intval($_GET[$x] ?? 0);
|
||||
}
|
||||
//check info_hash, peer_id and passkey
|
||||
foreach (array("passkey","info_hash","peer_id","port","downloaded","uploaded","left") as $x)
|
||||
@@ -42,7 +42,7 @@ foreach(array("numwant", "num want", "num_want") as $k)
|
||||
{
|
||||
if (isset($_GET[$k]))
|
||||
{
|
||||
$rsize = $_GET[$k] ?? 0;
|
||||
$rsize = intval($_GET[$k] ?? 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ if (!$az = $Cache->get_value('user_passkey_'.$passkey.'_content')){
|
||||
$Cache->cache_value('user_passkey_'.$passkey.'_content', $az, 950);
|
||||
}
|
||||
if (!$az) err("Invalid passkey! Re-download the .torrent from $BASEURL");
|
||||
$userid = $az['id'] ?? 0;
|
||||
$userid = intval($az['id'] ?? 0);
|
||||
|
||||
//3. CHECK IF CLIENT IS ALLOWED
|
||||
$clicheck_res = check_client($peer_id,$agent,$client_familyid);
|
||||
|
||||
Reference in New Issue
Block a user