Hello. I'm getting several PHP errors when using the SingleFrame module in a block. Here are the errors:

Notice: Undefined variable: controls_top in include() (line 10 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).
Notice: Undefined variable: pager_top in include() (line 10 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).
Notice: Undefined variable: image_count_top in include() (line 10 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).
Notice: Undefined variable: controls_bottom in include() (line 20 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).
Notice: Undefined variable: pager_bottom in include() (line 20 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).
Notice: Undefined variable: image_count_bottom in include() (line 20 of views_slideshow/contrib/views_slideshow_singleframe/views-slideshow-singleframe.tpl.php).

I'm attaching a patch that puts an isset() around each variable, which alleviates the error. I'm not sure why the error is happening; I thought that if you call a variable and it isn't set, it just returns FALSE. Maybe there's something else going on here.

In any case, here's the patch. I'm running PHP 5.3, and the slideshow is working just fine otherwise.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

redndahead’s picture

Status: Active » Fixed
FileSize
4.8 KB
3.46 KB

Thank you! I decided to declare the variables instead of doing the checks. These patches were committed.

Status: Fixed » Closed (fixed)

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

pkiraly’s picture

This patch is essentially the same as 879840-strict_errors-1.patch, the difference is that it was created for the Git (against 6.x-2.3 tag), so the header of the patch is different. I did it, because I was not able to run that patch.

ergonlogic’s picture

Status: Closed (fixed) » Patch (to be ported)

Please update the 6.x-2.x branch with the patch in #3.

ergonlogic’s picture

Status: Patch (to be ported) » Closed (fixed)

Sorry, nevermind.

ergonlogic’s picture

Status: Closed (fixed) » Needs work

Actually, on second thought, a new -dev snapshot would be helpful, as this patch is not in the current snapshot.

Better yet, would be a new 6.x-2.4 release... :)

redndahead’s picture

Status: Needs work » Closed (fixed)

I'm looking at the dev version and it has those changes.