I am using the following in the Body Template of a particular content type:
<div style="margin-bottom:20px">
<?php if (content_format('field_officialwebsite', $field_officialwebsite[0]) != '') : ?>
<img width="13" src="./images/bullet.gif" title="Official website" alt="Official website" />
<?php foreach ($field_officialwebsite as $officialwebsite) { ?>
<b><?php print content_format('field_officialwebsite', $officialwebsite) ?></b><?php } ?>
<span class="linksitems">(link will open in a new window)</span>
<?php endif; ?>
</div>
<?php print $node->content['body']['#value'] ?>This is resulting in the following error messages:
warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/modules/node/node.module on line 521.
warning: implode() [function.implode]: Invalid arguments passed in /home/xxxxxx/public_html/modules/node/node.module on line 525.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/xxxxxx/public_html/includes/database.mysql.inc on line 172.
I haven't tampered with the core files.
The output displays ok, but comes with the error message. It was fine earlier, till the hosts upgraded to PHP 5.2.5.
What am I doing wrong here?