_hs_process_render_create_new_item() checks isset($element['#value']['hierarchical_select']['selects']), but there are circumstances in which $element['#value'] is a string rather than an array, and PHP (a) uses the [] syntax for string indexing as well as array indexing, and (b) will coerce a string into an integer if it needs one (zero in the case of the string 'hierarchical_select').

Hence that test can result in:

Notice: Uninitialized string offset: 0 in _hs_process_render_create_new_item()

CommentFileSizeAuthor
#1 array_vs_string_indexing-1399414.patch5.05 KBjweowu

Comments

jweowu’s picture

Status: Active » Needs review
StatusFileSize
new5.05 KB
raphael apard’s picture

Patch #1 works for me.
I've got this error on staging only (redhat).

gold’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This is a 7 year old issue. I've been unable to replicate it (steps to replicate would be good). The patch no longer applies.

If this is still an issue please reopen with detailed steps to replicate the issue and reroll the patch against 7.x-3.x.