× Discussion about Hot Joomla Carousel free Joomla module.

Topic-icon PHP Errors

More
6 years 10 months ago #9123 by WideGlide
PHP Errors was created by WideGlide
These errors have been reported before by others with no resolution. I'm also experiencing them so I wanted to start a new topic.

PHP Notice: Undefined variable: infinite_list in [My Path]\joomla\modules\mod_hot_joomla_carousel\tmpl\default.php on line 74

PHP Notice: Undefined offset: 1 in [My Path]\joomla\modules\mod_hot_joomla_carousel\tmpl\default.php on line 83

PHP Notice: Undefined offset: 1 in [My Path]\joomla\modules\mod_hot_joomla_carousel\tmpl\default.php on line 86

Before anyone suggests it, suppressing error reporting is not the answer.

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #9124 by WideGlide
Replied by WideGlide on topic PHP Errors
It seems that if you add the following line of code:

$infinite_list = "";

to the begining of /mod_hot_joomla-carousel/tmpl/default.php, the "Undefined variable: infinite_list in [My Path]\joomla\modules\mod_hot_joomla_carousel\tmpl\default.php on line 74" goes away.

I switched the "Direction of Images" setting in the module admin panel from horizontal to vertical and can now see the undefined offset warnings scrolling nicely in the carousel (but no images). the warning is not visible in the horizontal mode.

Please Log in or Create an account to join the conversation.

More
6 years 9 months ago - 6 years 9 months ago #9893 by farr
Replied by farr on topic PHP Errors
I solved this issue changing the following lines of code:

***deafult.php line 73***
if ($handle = opendir($carouselFullPath)) {
                    while (false !== ($file = readdir($handle))) {
                        if ($file != "." && $file != "..") {
                            $infinite_list = $infinite_list."$file"."||";
                        }
                    }
to
if ($handle = opendir($carouselFullPath)) {	
				$infinite_list = "";
                    while (false !== ($file = readdir($handle))) {
					
                        if ($file != "." && $file != "..") {
                             if($infinite_list !== "")
							{ $infinite_list = $infinite_list."||"."$file";}
							else
							{ $infinite_list = "$file";}
				
                    }		
                        }
Last edit: 6 years 9 months ago by farr.

Please Log in or Create an account to join the conversation.

More
6 years 9 months ago #9902 by ivan.milic
Replied by ivan.milic on topic PHP Errors
Thank's for posting your solution.

Please Log in or Create an account to join the conversation.

Time to create page: 0.128 seconds