Closed (fixed)
Project:
Table of Contents
Version:
6.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2009 at 05:48 UTC
Updated:
7 Aug 2009 at 06:00 UTC
warning: Invalid argument supplied for foreach() in .../sites/all/modules/tableofcontents/tableofcontents.pages.inc on line 685.
Inspecting the code:
if (!empty($toc->files)) {
$has_files = FALSE;
$files_output .= '<li><a href="#attachments">' . t("Attachments") . "</a>";
$files_output .= "<" . $toc->list . ">";
foreach($files as $file) {
....
Should not the foreach be $toc->files?
foreach($toc->files as $file) {
Comments
Comment #1
iva2k commentedI tried the proposed fix above - it seems to remove the problem. Also, the attachments appeared in the table of contents.
Comment #2
AlexisWilke commentediva2k,
Yes. You go the fix right. I checked it in.
Thank you.
Alexis Wilke