From 2e18920891f607a3ded021c5f3352e13eddcff90 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 31 Aug 2009 10:12:45 +1200 Subject: [PATCH] fixed some E_STRICT notices --- audio.module | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/audio.module b/audio.module index 31e4276..91936d0 100755 --- a/audio.module +++ b/audio.module @@ -548,10 +548,12 @@ function _audio_save(&$node) { // Save the new tags. $allowed_tags = audio_get_tags_allowed(); - foreach ($node->audio_tags as $tag => $value) { - if (in_array($tag, $allowed_tags) && $value) { - $metadata = array('vid' => $node->vid, 'tag' => $tag, 'value' => $value, 'clean' => audio_clean_tag($value)); - drupal_write_record('audio_metadata', $metadata); + if (is_array($node->audio_tags)) { + foreach ($node->audio_tags as $tag => $value) { + if (in_array($tag, $allowed_tags) && $value) { + $metadata = array('vid' => $node->vid, 'tag' => $tag, 'value' => $value, 'clean' => audio_clean_tag($value)); + drupal_write_record('audio_metadata', $metadata); + } } } } @@ -813,8 +815,8 @@ function audio_node_form_validate($form, &$form_state) { // the upload operation, it gives the audio_id3 module a chance to read // the tags. $form_state['values']['audio'] = $node->audio; - $form_state['values']['audio_tags'] = $node->audio_tags; - $form_state['values']['audio_images'] = $node->audio_images; + $form_state['values']['audio_tags'] = (isset ($node->audio_tags) ? $node->audio_tags : ''); + $form_state['values']['audio_images'] = (isset ($node->audio_images) ? $node->audio_images : ''); } } -- 1.6.0.4