Illegal string offset

1 posts by 1 authors in: Forums > CMS Builder
Last Post: March 3, 2021   (RSS)

By petrogus - March 3, 2021

Hi to everyone

I would like to ask your help. I am not sure how it start but realize that I have the following error . ( this maybe start after update or php version change)

Warning: Illegal string offset 'image' in /home/xxxx/public_html/products.php on line 154
<img src="Warning: Illegal string offset 'image' in /home/xxxx/public_html/products.php on line 155

I have copy the specific code line. Have anyone idea why this happen

thank you in advance

											<ul class="slides">
											<?php if($catLink == 0) { ?>
												<li>
													<a href="products.php?category=<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>&cat=<?php echo $rootCat['num']; ?>">
														<?php if(!$rootCat['image']) { ?><img src="images/nocat.jpg" alt="<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>" />
														<?php } else { ?><img src="inc/timthumb.php?src=<?php echo $rootCat['image'][0]['thumbUrlPath']; ?>&amp;w=215" alt="<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>" /><?php } ?>
													</a>
												</li>
											<?php } elseif($catLink == 1) { ?>
												<li>
													<a href="products.php?category=<?php echo htmlencode($parentCat['name_'.$_SESSION['language']]); ?>&cat=<?php echo $parentCat['num']; ?>&type=<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>&id=<?php echo $rootCat['num']; ?>">
														<?php if(!$rootCat['image']) { ?><img src="images/nocat.jpg" alt="<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>" />
														<?php } else { ?><img src="inc/timthumb.php?src=<?php echo $rootCat['image'][0]['thumbUrlPath']; ?>&amp;w=215" alt="<?php echo htmlencode($rootCat['name_'.$_SESSION['language']]); ?>" /><?php } ?>
													</a>
												</li>
											<?php } ?>
											</ul>
PetroGus