Closed (duplicate)
Project:
Decisions
Version:
6.x-1.x-dev
Component:
Code - Base Decisions module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 May 2012 at 00:48 UTC
Updated:
20 May 2012 at 01:20 UTC
The _decisions_randomize_options() function no longer works on PHP versions >= 5.2.10, due to an API change in PHP. See http://ca2.php.net/array_rand:
5.2.10 The resulting array of keys is no longer shuffled.
With a higher PHP version:
// Put array keys from ordered choices in random order.
$rand_keys = array_rand($choices, $num_choices);
dsm($rand_keys);
...$rand_keys will have the keys in the exact order as the original array.
Please DO NOT commit a fix for this issue without also committing the fix at #1589306: Random order ranking poll produces completely invalid poll results or you will cause voting results to be completely invalid!
Comments
Comment #1
cafuego commentedThis issue is addressed in the patch on comment #2 on #1589306: Random order ranking poll produces completely invalid poll results.
Comment #2
webchickThis is being handled in #1589306: Random order ranking poll produces completely invalid poll results.