By gm4aff on
I get this error:
Notice: Array to string conversion in dxfc_century_club_block_view() (line 83 of /var/www/html/sites/all/modules/dxfc_century_club/dxfc_century_club.module).
...with this code:
function dxfc_century_club_block_view($delta = '') {
$block = '';
switch ($delta) {
case 'dxfc_century_club':
$block['subject'] = t('DXFC Century Club');
if (user_access('access content')) {
// Use our custom function to retrieve data.
$result = dxfc_century_club_contents('block');
// Declare an array to contain items for the block to render.
$items = array();
// Iterate over the resultset and cleanse.
foreach ($result as $entry) {
$items[] = array_map('check_plain', (array) $entry);
}
// No content
if (empty($items)) {
$block['content'] = t('No records available or module failure.');
}
else {
// Pass data through theme function.
$header = array(t('Callsign'), t('DXFC Count'));
//LINE 83...
$block .= theme('table', array('header' => $header, 'rows' => $items));
}
}
return $block;
}
}
Can someone please explain why I get this error from this line?
I'm so sorry I've got to the point where I've had to ask this!
Stewart
Comments
I'd say your problem probably
I'd say your problem probably lies in this line:
It's likely not returning the values in the correct row format.
Contact me to contract me for D7 -> D10/11 migrations.
Thanks Jaypan. That is
Thanks Jaypan. That is strange, as this syntax is used in many of the Drupal examples.