X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Futils%2FUIDGenerator.php;h=fea5404c841cf4afc130a05391cdd7f597390292;hb=fb04cc5a7ef629703535dccdaecd6fe02f203c81;hp=15c0cf9602dff1bdf502e28aec05b0e34439e573;hpb=93350da7f1ab397b87c3ac3073ddfc1c857b272e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index 15c0cf9602..fea5404c84 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -137,8 +137,7 @@ class UIDGenerator { $time = $info['time']; $counter = $info['offsetCounter']; } else { - $time = $info[0]; - $counter = $info[1]; + list( $time, $counter ) = $info; } // Take the 46 LSBs of "milliseconds since epoch" $id_bin = $this->millisecondsSinceEpochBinary( $time ); @@ -192,9 +191,7 @@ class UIDGenerator { $counter = $info['offsetCounter']; $clkSeq = $info['clkSeq']; } else { - $time = $info[0]; - $counter = $info[1]; - $clkSeq = $info[2]; + list( $time, $counter, $clkSeq ) = $info; } // Take the 46 LSBs of "milliseconds since epoch" $id_bin = $this->millisecondsSinceEpochBinary( $time ); @@ -577,7 +574,7 @@ class UIDGenerator { $start = microtime( true ); do { $ct = time(); - // https://secure.php.net/manual/en/language.operators.comparison.php + // https://www.php.net/manual/en/language.operators.comparison.php if ( $ct >= $time ) { // current time is higher than or equal to than $time return $ct;