Hi folks,

When I'm uploading pictures via Image module, I'm receiving these errors:
# warning: Invalid argument supplied for foreach() in /hermes/web02/b2962/jovestec/seaandsnow/main/modules/cck/content.module on line 859.
# warning: Invalid argument supplied for foreach() in /hermes/web02/b2962/jovestec/seaandsnow/main/modules/cck/content.module on line 1112.
# warning: Invalid argument supplied for foreach() in /hermes/web02/b2962/jovestec/seaandsnow/main/modules/cck/content.module on line 1112.
# warning: Invalid argument supplied for foreach() in /hermes/web02/b2962/jovestec/seaandsnow/main/modules/cck/content.module on line 1152.

The code refers to field/table calls see below. Any suggestions? Many thanks, James

l853 switch ($op) {
l854 case 'load':
l855 // OPTIMIZE: load all non multiple fields in a single JOIN query ?
l856 // warning: 61-join limit in MySQL ?
l857 $additions = array();
l858 // For each table used by this content type,
l859 foreach ($type['tables'] as $table) {
l860 $schema = drupal_get_schema($table);
l861 $query = 'SELECT * FROM {'. $table .'} WHERE vid = %d';

l890 case 'insert':
l891 case 'update':
l892 foreach ($type['tables'] as $table) {
l893 $schema = drupal_get_schema($table);
l894 $record = array();
l895 foreach ($schema['content fields'] as $field_name) {
l896 if (isset($node->$field_name)) {
l897 $field = content_fields($field_name, $type_name);
l898 // Multiple fields need specific handling, we'll deal with them later on.
l899 if ($field['multiple']) {
l900 continue;
l901 }

l928 // Handle multiple fields.
l929 foreach ($type['fields'] as $field) {
l930 if ($field['multiple'] && isset($node->$field['field_name'])) {
l931 $db_info = content_database_info($field);
l932 // Delete and insert, rather than update, in case a value was added.
l933 if ($op == 'update') {
l934 db_query('DELETE FROM {'. $db_info['table'] .'} WHERE vid = %d', $node->vid);
l935 }

l1111 $return = array();
l1112 foreach ($type['fields'] as $field) {
l1113 $items = isset($node->$field['field_name']) ? $node->$field['field_name'] : array();

l1151 else {
l1152 foreach ($type['fields'] as $field) {
l1153 $items = isset($node->$field['field_name']) ? $node->$field['field_name'] : array();
l1154 $result = content_field($op, $node, $field, $items, $teaser, $page);
l1155 if (is_array($result)) {
l1156 $return = array_merge($return, $result);
l1157 }

CommentFileSizeAuthor
#1 image_module.JPG131.11 KBjjoves

Comments

jjoves’s picture

StatusFileSize
new131.11 KB
jjoves’s picture

Assigned: Unassigned » jjoves
Priority: Critical » Normal
Status: Active » Closed (fixed)

The above was caused from disabling CSS in Administer > Site Configuration > Performance. I was working on some side code for themes and realized after long nights and lack of sleep, I forgot to enable it. A lesson for anyone else out there with similar outcomes. -James