[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Forums module: Fix array_slice null error in...

"Baraka Kinywa \(@bkinywa24\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <692c3c63b4063_2a17b808646d7@gitlab-sidekiq-low-urgency-cpu-bound-v2-5df5c99858-9vztj.mail>

Baraka Kinywa pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
fee8d24f by Espoir Baraka at 2025-11-30T14:37:50+02:00
[FIX] Forums module: Fix array_slice null error in...
---
* [FIX] Forums module: Fix array_slice null error in...
---
* [FIX] Forums module: Fix array_slice null error in forums_most_commented_forums module when no forums are accessible

See merge request tikiwiki/tiki!9135

(cherry picked from commit 5409a5b66411cfe523af9871cd4d236d2a2d8234)

See merge request tikiwiki/tiki!9154

- - - - -


2 changed files:

- lib/comments/commentslib.php
- lib/core/Perms.php


Changes:

=====================================
lib/comments/commentslib.php
=====================================
@@ -1527,6 +1527,7 @@ class Comments extends TikiLib
             }
             //need to sort within sections if sections are used (also works if sections aren't used)
             $sections = array_unique(array_column($result, 'section'));
+            $sorted = [];
             foreach ($sections as $section) {
                 foreach ($sortarray as $key => $data) {
                     if ($result[$key]['section'] === $section) {


=====================================
lib/core/Perms.php
=====================================
@@ -219,7 +219,7 @@ class Perms
      * @param $permission string|array The permission name to validate on each record.
      * @return array What remains of the dataset after filtering.
      */
-    public static function filter(array $baseContext, $bulkKey, array $data, array $contextMap, $permission)
+    public static function filter(array $baseContext, $bulkKey, array $data, array $contextMap, $permission): array
     {
         $cacheKey = md5(serialize($baseContext) . serialize($bulkKey) . serialize($data) . serialize($contextMap) . serialize($permission));
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fee8d24f9bd19a692f03df32eff4ff9f245225f2

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fee8d24f9bd19a692f03df32eff4ff9f245225f2
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.