Per your installation instructions I am attempting to go to
Admin->Site Config->TinyBrowser

I get this error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _form_set_class() (line 3969 of /usr/www/users/bobpcw/includes/form.inc).

When I navigate back to the home page i get this error again...

Help!

CommentFileSizeAuthor
#4 class_array-1080796-4.patch491 bytesBWPanda
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixture’s picture

Modify the tinybrowser.php (line #1153 or somewhere nearby) to change
From:
'#attributes' => array('class' => 'tinybrowser-weight'),
To:
'#attributes' => array('class' => array('tinybrowser-weight')),

Here's the extract of the function tinybrowser_role_form() where you need to modify.
I hope this will fix the issue.

Before (tinybrowser.php)

/**
 * Role profile form
 */
function tinybrowser_role_form($role, $weight = TRUE, $core = TRUE) {
  $form['name'] = array(
    '#type' => 'item',
    '#markup' => $role['name'],
  );
  if ($weight) {
    $form['weight'] = $core ? array(
      '#type' => 'textfield',
      '#value' => $role['weight'],
      '#attributes' => array('readonly' => 'readonly', 'style' => 'border:none; width: 2em; background-color: tran
sparent;'),
    ) : array(
      '#type' => 'weight',
      '#default_value' => $role['weight'],
      '#attributes' => array('class' => 'tinybrowser-weight'),
    );
  }
  $options = array(t('none'));
  foreach (variable_get('tinybrowser_profiles', array()) as $pid => $profile) {
    $options[$pid] = $profile['name'];
  }
  $form['pid'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $role['pid'],
  );
  return $form;
}

After

/**
 * Role profile form
 */
function tinybrowser_role_form($role, $weight = TRUE, $core = TRUE) {
  $form['name'] = array(
    '#type' => 'item',
    '#markup' => $role['name'],
  );
  if ($weight) {
    $form['weight'] = $core ? array(
      '#type' => 'textfield',
      '#value' => $role['weight'],
      '#attributes' => array('readonly' => 'readonly', 'style' => 'border:none; width: 2em; background-color: tran
sparent;'),
    ) : array(
      '#type' => 'weight',
      '#default_value' => $role['weight'],
      '#attributes' => array('class' => array('tinybrowser-weight')),
    );
  }
  $options = array(t('none'));
  foreach (variable_get('tinybrowser_profiles', array()) as $pid => $profile) {
    $options[$pid] = $profile['name'];
  }
  $form['pid'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $role['pid'],
  );
  return $form;
}
audster’s picture

Status: Active » Closed (fixed)

Thank you!

The function is not in tinybrowser.php though...

I found it in tinybrowser.module
made the change and

VOILA!

audster’s picture

Title: Warning: array_merge() [function.array-merge]: Argument #1 is not an array » Clean URLs
Component: Code » Miscellaneous
Status: Closed (fixed) » Active

regrading CLEAN URLs

In the doc it says this needs to be enabled and working.

you may have noticed that this is a real issue under D7 (the enable clean URLs checkbox not working and various configuration changes are not helping folks... I am one of them.. )

Clean URLS are not working on my site (and probably won't be until I can point the domain to the shared server when I'm done getting it up and running...) but tinybrowser seems to be handling it...

So errr, just what mayhem awaits me if Clean URLs isn't running/working?

BWPanda’s picture

Title: Clean URLs » Warning: array_merge() [function.array-merge]: Argument #1 is not an array
Version: 7.x-1.1 » 7.x-1.x-dev
Component: Miscellaneous » Code
Category: support » bug
Status: Active » Needs review
FileSize
491 bytes

Here's a patch to fix the class array issue. The clean URLs issue should be opened separately.