Skip to content

Решение бага с PHP ошибкой в Галерее

Внимание, правилось на ipb 3.4.0! Для своей версии проверяйте самостоятельно, работает или нет.

 

Когда в галерее есть категория и нет в ней изображения (пустая), то на странице форума может вылезти неприятный php баг (см. аттач).

 

Решается так:

 

ваш_сайт/hooks/gallery_attach_forums_b5837a552916d3be8d5333452a37ae85.php (или похожий, уникальный для вашего сайта)

 

Найти:

 

$category = array_merge( $category['_latestImage'], $category );
$string .= $this->registry->output->getTemplate('gallery_external')->$

 

Заменить на:

 

if ($category['_totalImages']) {
$category = array_merge( $category['_latestImage'], $category );
$string .= $this->registry->output->getTemplate('gallery_external')->$
}

 

Скриншот проблемы:

 

89fe216c28e9t.jpg

Edited by Zero108

Featured Replies

No posts to show

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.