In this function, it checks for $form_values that == 1. unfortunately, if the form_token STARTS with 1, the comparison results to true. I changed it to
if ($value === 1 && strpos($item, 'selectall') === FALSE) {
(note three =)
And it worked great.

CommentFileSizeAuthor
#2 simpletestSafariProblem.patch711 bytesRok Žlender

Comments

fworsley’s picture

I have the same problem. Without this change I'm unable to run selected tests. It results in this error message:

Fatal error: Class 'form_token' not found in /home/frank/workspace/trunk/drupal-5.2/sites/all/modules/simpletest/drupal_unit_tests.php on line 72

After changing this to "===" everything works fine.

Rok Žlender’s picture

Status: Active » Needs review
StatusFileSize
new711 bytes

This patch solves it. I'll commit tmrw if no-one objects as its a very simple patch

robertdouglass’s picture

Status: Needs review » Reviewed & tested by the community

I was unsuccessful recreating my original problem but my tests run cleanly with this patch and the code looks sound.

Rok Žlender’s picture

Status: Reviewed & tested by the community » Fixed

Committed to D5 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.