--- workflow_access.module	2008-04-02 18:44:07.000000000 +0200
+++ workflow_access.module	2008-07-31 18:14:53.000000000 +0200
@@ -86,7 +86,8 @@
  * Add a "three dimensional" (state, role, permission type) configuration 
  * interface to the workflow edit form.
  */
-function workflow_access_form_alter($form_id, &$form) {
+function workflow_access_form_alter(&$form, $form_state, $form_id) {
+  //$form_id, &$form) { 
   // We only work with the workflow edit form.
   if ($form_id != 'workflow_edit_form') {
     return;
@@ -121,9 +122,11 @@
 
     // Allow view grants by default for anonymous and authenticated users, 
     // if no grants were set up earlier.
-    if (db_num_rows($result) == 0) {
-      $view = array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID);
-    }
+    // Is not necessary because db_fetch_object works fine (return FALSE after the last
+    // db fetch)
+    //if (db_num_rows($result) == 0) {
+    //  $view = array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID);
+    //}
 
     while ($access = db_fetch_object($result)) {
       if ($access->grant_view) {
