1. Create a panel for built-in 'user_view' and place user picture as a content
2. Preview or open user page and get WSOD with PHP Fatal error: Cannot use object of type stdClass as array in <..>/includes/theme.inc on line 800

Reason: theme() now takes second argument $variables as array, while user_picture passes $account object:
<?
function ctools_user_picture_content_type_render($subtype, $conf, $panel_args, $context) {
...
$block->title = check_plain($account->name);
$block->content = theme('user_picture', array($account));
...
?>

and at line 800 of theme.inc the first hit is done over 'array', leading to error.

CommentFileSizeAuthor
#3 1019642.patch733 byteseclipsegc

Comments

OnkelTem’s picture

Damned inability to edit first post grrrrr... should be:

1. Create a panel for built-in 'user_view' and place user picture as a content
2. Preview or open user page and get WSOD with PHP Fatal error: Cannot use object of type stdClass as array in <..>/includes/theme.inc on line 800

Reason: theme() now takes second argument $variables as array, while user_picture passes $account object:

function ctools_user_picture_content_type_render($subtype, $conf, $panel_args, $context) {
...
$block->content = theme('user_picture', $account); 
...

and at line 800 of theme.inc the first hit is done over 'array', leading to error.

wikp’s picture

subscribe

eclipsegc’s picture

Assigned: Unassigned » eclipsegc
Priority: Critical » Normal
Status: Active » Needs review
StatusFileSize
new733 bytes

This patch should fix that.

eclipsegc’s picture

Apologies, I did the conversion for this content type, but must have failed to upload a patch.

Alexander Matveev’s picture

subscribe

eclipsegc’s picture

switching to a git workflow instead of patches:

git clone --branch 1019642 eclipsegc@git.drupal.org:sandbox/eclipsegc/1073402.git eclipse_ctools_sandbox

eclipsegc’s picture

git clone --branch 1019642 http://git.drupal.org/sandbox/eclipsegc/1073402.git

read only sorry

merlinofchaos’s picture

Status: Needs review » Fixed

Merged and rebased and pushed.

Status: Fixed » Closed (fixed)

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