Error Log Issue : PHP Warning

  • chris434
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
2 years 3 months ago #49613 by chris434
Hi there

Joomla 3.X on PHP 7.X using the Construction template.

I see an error log in the root of the website containing repeating rows as follows:

[12-Oct-2022 08:26:49 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/account/public_html/templates/hot_construction/css/template_css.php on line 57
[12-Oct-2022 08:26:49 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/account/public_html/templates/hot_construction/css/template_css.php on line 167

Please can this be addressed?

Chris

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
2 years 3 months ago #49614 by milos
Replied by milos on topic Error Log Issue : PHP Warning
Hello,

Please edit the template file /templates/hot_construction/css/template_css.php and around line 57 above this line:
Code:
foreach($module_grid2 as $gridRow){

add this line
Code:
if (isset($module_grid2))

so the two lines look like this:
Code:
if (isset($module_grid2)) foreach($module_grid2 as $gridRow){

Do the same around line 167.

These changes should get rid of the warnings.

Regards,
Milos

Please Log in to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum