Hi, wonderful small module, thanks.

I'm having this warning with PHP 5.3.8:

Notice: Uninitialized string offset: 25 a include() (line 32 de /usr/home/domain.com/web/subdomain/sites/all/modules/views_delimited_list/views-view-delimited-list.tpl.php).

I've just added:

$rows = array() ;

before the foreeach to try to "initialize" $rows, but I'm not sure how necessary it is. Why it is the PHP processor complaining? Any idea?

Comments

zhangtaihao’s picture

Status: Active » Fixed

Adding $rows = array(); will in fact empty all results, so please don't do it as you will see nothing from the view.

The reason for the error is that the classes variable has somehow been set to '25' (perhaps by a module globally preprocessing classes).

I have updated the template (b14a805) to conform with Views D7 template style. That should circumvent the issue.

Status: Fixed » Closed (fixed)

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

jorditr’s picture

I'm back to the project were I found that trouble. I could not find anything on your correction. The block is a list of a taxonomy vocabulary. Replacing the vocabulary for another with more items, the list of warnings was even bigger. Looking at the line that the PHP notice is pointing:

print '<span class="' . $classes[$i] . '">';

I realized that maybe "$classes" is not inicialized: what is supposed to replace? When I changed that line by:

print '<span class="t-' . $i . '">';

The message is gone, and everything works properly, every span having an individual class.

jorditr’s picture

Status: Closed (fixed) » Needs work

I forgot to reopen the thread :-)

jorditr’s picture

Issue summary: View changes

Small mistake on code.

colan’s picture

Version: 7.x-1.x-dev » 2.x-dev
Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)

Is this still a problem in D8+?

mparker17’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing as "Outdated" because the issue has been sitting in "Needs more info" for 3 years with no response.