I did a fresh install of Drupal 5.1. I installed the newest version of UserPoints. It is the module that I added. Anyway, when I tried to go to admin/user/userpoints/add I would get the message "Cannot user string offset as an array..." After looking through / following the code, it appeared that there was one minor typo that killed it.

Line 509 of userpoints.module reads:

'#maxlength' => 128,+ '#description' => t('Enter optional reference for this transaction. This field will be indexed and searchable.'),

I believe that this is supposed to read:

'#maxlength' => 128,
'#description' => t('Enter optional reference for this transaction. This field will be indexed and searchable.'),

It seems that the + should really be a newline.

I hope this is useful to you (and not a duplicate).

-- Joshua Rogers

Comments

dldege’s picture

Same issue - and removing the + and adding a new line does fix the problem.

kbahey’s picture

Version: 5.x-1.x-dev » 5.x-2.12
Status: Needs review » Fixed

Thanks for the bug report and recommended fix.

Committed to 5.x and HEAD.

The change will be in 5.x-2.12 (available shortly).

Anonymous’s picture

Status: Fixed » Closed (fixed)