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 {
        ...
      }
    }
...
}

Comments

devin carlson’s picture

Assigned: Unassigned » devin carlson
Status: Active » Needs review
StatusFileSize
new3.75 KB

A patch to check for the existence of a description value and format before using them.

devin carlson’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x.

SilviuChingaru’s picture

I'll try it and give you a feedback. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.