E_STRICT notices on audio node creation
Shiny - August 30, 2009 - 22:20
| Project: | Audio |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Shiny |
| Status: | needs work |
Jump to:
Description
notice: Undefined property: stdClass::$audio_tags in /home/br3nda/projects/drupal/sites/all/modules/audio/audio.module on line 816.
notice: Undefined property: stdClass::$audio_images in /home/br3nda/projects/drupal/sites/all/modules/audio/audio.module on line 817.
warning: Invalid argument supplied for foreach() in /home/br3nda/projects/drupal/sites/all/modules/audio/audio.module on line 551.patch attached
| Attachment | Size |
|---|---|
| 0001-fixed-some-E_STRICT-notices.patch | 1.68 KB |

#1
Thanks for the patch. Noticed a couple of small issues though.
I think we should probably be using an isset() or !empty() here to avoid the warning rather than is_array():
+ if (is_array($node->audio_tags)) {shouldn't have a space between isset and the parens:
+ $form_state['values']['audio_tags'] = (isset ($node->audio_tags) ? $node->audio_tags : '');+ $form_state['values']['audio_images'] = (isset ($node->audio_images) ? $node->audio_images : '');
#2
oh man... I am getting this error on a fresh install of Drupal 6.14 with Audio 6.x-1.x-dev:
But I have no idea to apply your patch. I looked up patching on Drupal but its a bit beyond my level of expertise. What confuses me, is that I used Audio on another Drupal site on the same server without this error.