Closed (fixed)
Project:
Nivo Slider
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 May 2012 at 14:53 UTC
Updated:
16 Jul 2012 at 14:11 UTC
Jump to comment: Most recent file
I get the following php notice with this module installed:
Notice: Undefined index: format în nivo_slider_slider() (linia 94 din /data/drupal/sites7/burlacutrans.com/modules/nivo_slider/slider.inc).
I don't set any description for image because I don't want captions so I think that the following function should look like this:
function nivo_slider_slider() {
...
foreach ($visible_slides as $slide => $settings) {
// Create a variable to hold the slide description
$description = '';
//OUTPUT ONLY FOR IMAGE WITH DESCRIPTIONS
if(!is_null($settings['description']['value'])) {
// Set the slide description directly when using plain text otherwise create an
// HTML caption
//CHECK IF 'FORMAT' IS SET
if (isset($settings['description']['format']) && $settings['description']['format'] == 'plain_text') {
$description = $settings['description']['value'];
}
else {
...
}
}
...
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | add-check-for-description-1564540-1.patch | 3.75 KB | devin carlson |
Comments
Comment #1
devin carlson commentedA patch to check for the existence of a description value and format before using them.
Comment #2
devin carlson commentedCommitted to 7.x-1.x.
Comment #3
SilviuChingaru commentedI'll try it and give you a feedback. Thank you!