From 4efc3d4096bc1d29e9d77f9af7194b2babfa2821 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 20 Jun 2012 13:48:37 +0100 Subject: [PATCH] MDL-33911 lib/evalmath: fix strict syntax notices --- lib/evalmath/evalmath.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/evalmath/evalmath.class.php b/lib/evalmath/evalmath.class.php index 9d9c7d6250b..8f68d2a9de4 100644 --- a/lib/evalmath/evalmath.class.php +++ b/lib/evalmath/evalmath.class.php @@ -557,9 +557,8 @@ class EvalMathFuncs { return $min + $randomno; } - static function rand_float(){ - $randomvalue = array_shift(unpack('v', md5(self::get_random_seed(), true))); - return $randomvalue / 65536; + static function rand_float() { + $randomvalues = unpack('v', md5(self::get_random_seed(), true)); + return array_shift($randomvalues) / 65536; } - } -- 2.43.0