Download & Extend

warning: array_shift() [function.array-shift]: The argument should be an array in /.../ctools/includes/context.inc on line 1051.

Project:Chaos tool suite (ctools)
Version:6.x-1.6
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (cannot reproduce)

Issue Summary

Hi.

I have the following scenario:

A user profile page that uses Panels 3 and Content Profile (all the last dev at 2009/08/12). I'm using tabbed panels, and I want to display a tab with the comments, the form, and other data.

I've created all, and I'm trying to create a minipanel with the comment,. the form to send comments, and textual data. I've created it and tried using different required contexts (user and node), but each time I use one of them, when trying to display it it shows me a "warning: array_shift() [function.array-shift]: The argument should be an array in /.../sites/all/modules/ctools/includes/context.inc on line 1051." error, one for each context.

Some idea?

Comments

#1

subscribing.

had this same scenario with a minipanel as a tab in a view

added this condition in line 1048 that if $contexts is not an array return an empty array as well

if (!is_array($required) || !is_array($contexts)) {

#2

Can you please give detailed instructions on how to get to this error message, to make it easier for me to debug? I could probably figure this out given enough time, but time is precious...

#3

subscribing.

#4

Version:6.x-1.x-dev» 6.x-1.6

Traced that to ctools_content_select_context(): The $conf array there does not contain a context element. That's why ctools_content_select_context() doesn't return a context and array_shift() fails on that. Hopefully that helps a bit.

#5

It helps a little, though I still need to know how to get into that situation. What content, what options. Is it reliably reproducible? Etc.

#6

Status:active» postponed (maintainer needs more info)

#7

Status:postponed (maintainer needs more info)» closed (cannot reproduce)
nobody click here