Browse Source

Fix uniqid() arguments

Fixing uniqid arguments for PHP 8
Roman Neiskusan 2 years ago
parent
commit
660e94c522

+ 1 - 1
modules/database/classes/Kohana/Session/Database.php

@@ -125,7 +125,7 @@ class Kohana_Session_Database extends Session {
 		do
 		{
 			// Create a new session id
-			$id = str_replace('.', '-', uniqid(NULL, TRUE));
+			$id = str_replace('.', '-', uniqid('', TRUE));
 
 			// Get the the id from the database
 			$result = $query->execute($this->_db);

+ 1 - 1
system/classes/Kohana/Security.php

@@ -86,7 +86,7 @@ class Kohana_Security {
 		else
 		{
 			// Otherwise, fall back to a hashed uniqid
-			return sha1(uniqid(NULL, TRUE));
+			return sha1(uniqid('', TRUE));
 		}
 	}