Browse code

admin/members.php, includes/- button.php, plain.button.php, user/lostpassword.php: casting from double to float due to deprecation notice - fix

Clarissa Walker authored on 2026/11/08 06:00:48
Showing 4 changed files
... ...
@@ -84,7 +84,7 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false;
84 84
 			dbquery("UPDATE "._AUTHORTABLE." SET admincreated = '0' WHERE "._UIDFIELD." = '".$_GET['release']."'");
85 85
 			$emailquery = dbquery("SELECT "._EMAILFIELD." as email, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE uid = '".$_GET['release']."'");
86 86
 			$email = dbassoc($emailquery);
87
-			mt_srand((double)microtime() * 1000000);
87
+			mt_srand((float)microtime() * 1000000);
88 88
 			$charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';
89 89
 			$pass = random_string($charset, 10);
90 90
 			$encryppass = password_hash($pass, PASSWORD_BCRYPT, ['cost' => 12]);
... ...
@@ -13,7 +13,7 @@ $darkgray = imagecolorallocate($image, 0x50, 0x50, 0x50);
13 13
 $black = imagecolorallocate($image, 0x00, 0x00, 0x00);
14 14
 
15 15
 
16
-srand((double)microtime()*1000000);
16
+srand((float)microtime()*1000000);
17 17
 unset($digit, $cnum);
18 18
 
19 19
 
... ...
@@ -11,7 +11,7 @@ $white    = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
11 11
 $gray    = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
12 12
 $darkgray = imagecolorallocate($image, 0x50, 0x50, 0x50);
13 13
 
14
-srand((double)microtime()*1000000);
14
+srand((float)microtime()*1000000);
15 15
 unset($digit, $cnum);
16 16
 for ($i = 0; $i < 60; $i++) {
17 17
   $x1 = rand(0,240);
... ...
@@ -51,7 +51,7 @@ if(isMEMBER) accessDenied( );
51 51
 			if(dbnumrows($result) == 0) $output .= write_message(_BADEMAIL);
52 52
 			else {
53 53
 				include("includes/emailer.php");
54
-				mt_srand((double)microtime() * 1000000);
54
+				mt_srand((float)microtime() * 1000000);
55 55
 				$charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';		
56 56
 				$pass = random_string($charset, 10);
57 57
 				$encryppass = password_hash($_POST['password'], PASSWORD_BCRYPT, ['cost' => 12]);