warning: Invalid argument supplied for foreach() in .../sites/all/modules/tableofcontents/tableofcontents.pages.inc on line 685.
iva2k - July 24, 2009 - 05:48
| Project: | Table of Contents |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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) {
#1
I tried the proposed fix above - it seems to remove the problem. Also, the attachments appeared in the table of contents.
#2
iva2k,
Yes. You go the fix right. I checked it in.
Thank you.
Alexis Wilke
#3
Automatically closed -- issue fixed for 2 weeks with no activity.