diff options
author | Christian Schneider | 2020-05-06 14:10:40 +0200 |
---|---|---|
committer | Christian Schneider | 2020-05-06 14:10:40 +0200 |
commit | c230360afbb9406ab239dbacd1181c149f9aa628 (patch) | |
tree | c2f10abe40b5c5dd830cbadfe8fba7404ec37820 /it_dbi.class | |
parent | 102778b78bd38b857b2bab7d23d949d7423d55f3 (diff) | |
download | itools-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.class | 2 |
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"); |