summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2020-05-06 14:10:40 +0200
committerChristian Schneider2020-05-06 14:10:40 +0200
commitc230360afbb9406ab239dbacd1181c149f9aa628 (patch)
treec2f10abe40b5c5dd830cbadfe8fba7404ec37820 /it_dbi.class
parent102778b78bd38b857b2bab7d23d949d7423d55f3 (diff)
downloaditools-c230360afbb9406ab239dbacd1181c149f9aa628.tar.gz
itools-c230360afbb9406ab239dbacd1181c149f9aa628.tar.bz2
itools-c230360afbb9406ab239dbacd1181c149f9aa628.zip
Use random_bytes() instead of uniqid() now that we require PHP 7.0 for itools
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 39f50a7..5b35fc1 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -766,7 +766,7 @@ function insert($tags = array(), $command = "INSERT")
$this->_write_pre_process($tags, $command);
if ($this->_p['randomid'] && !isset($tags[$this->_p['keyfield']]))
- $tags[$this->_p['keyfield']] = md5(uniqid(mt_rand()));
+ $tags[$this->_p['keyfield']] = bin2hex(random_bytes(16));
$set = $this->_set($tags, "insert");