[TikiWiki-commits] [Git][tikiwiki/tiki][master] 2 commits: [FIX] users: When adding users sometimes (e.g. from a Profile), and `$groups`...

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6893651342ac0_2cd5e80717a6@gitlab-sidekiq-low-urgency-cpu-bound-v2-766894c764-h4czb.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
dc994b22 by Jonny Bradley at 2025-08-06T15:20:16+01:00
[FIX] users: When adding users sometimes (e.g. from a Profile), and `$groups` is not an array, prevent fatal error when merging array with a string

- - - - -
16e34f90 by Jonny Bradley at 2025-08-06T15:21:39+01:00
[FIX] cache: Fix notices (seen while importing tracker data)

- - - - -


2 changed files:

- lib/cache/cachelib.php
- lib/userslib.php


Changes:

=====================================
lib/cache/cachelib.php
=====================================
@@ -499,7 +499,7 @@ class Cachelib
     public function invalidate_by_cache_purge_rules($args)
     {
         // First get all candidates which match type (source_itemId does not matter for now - see below)
-        $cache_purge_rules = $this->get_cache_purge_rules($args['type']);
+        $cache_purge_rules = $this->get_cache_purge_rules($args['type']) ?? [];
 
         foreach ($cache_purge_rules as $c) {
             if ($c['source_itemId'] == $args['object'] || $c['source_itemId'] == 0) {


=====================================
lib/userslib.php
=====================================
@@ -7075,7 +7075,7 @@ class UsersLib extends TikiLib
                 }
                 $this->assign_user_to_group($user, 'Registered');
             } else {
-                $this->assign_user_to_groups($user, array_merge('Registered', $groups));
+                $this->assign_user_to_groups($user, array_merge(['Registered'], [$groups]));
             }
         }
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/7d11e8dae1e91535f1766d6340686d525fda150a...16e34f900a235eb57c1cc54abb66b798fa5accbf

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/7d11e8dae1e91535f1766d6340686d525fda150a...16e34f900a235eb57c1cc54abb66b798fa5accbf
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.