[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Markdown: check toolbar data item is Json before parsing to array.

"Boss Ibrahim Mussa Gregoire \(@bim-g\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <691de927a8327_2a1ebcc28207@gitlab-sidekiq-low-urgency-cpu-bound-v2-cbb4bb8f8-lbd2z.mail>

Boss Ibrahim Mussa Gregoire pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
da10d91e by Boss Ibrahim Mussa Gregoire at 2025-11-19T16:50:37+01:00
[BP][FIX] Markdown:  check toolbar data item is Json before parsing to array.
---
* [FIX] Markdown:  check toolbar data item is Json before parsing to array.
---
* [FIX] Markdown: check toolbar data item is json to parse to array.

See merge request tikiwiki/tiki!7954

See merge request tikiwiki/tiki!9065

- - - - -


1 changed file:

- lib/core/Toolbar/ToolbarsList.php → lib/core/Lib/core/Toolbar/ToolbarsList.php


Changes:

=====================================
lib/core/Toolbar/ToolbarsList.php → lib/core/Lib/core/Toolbar/ToolbarsList.php
=====================================
@@ -230,7 +230,7 @@ class ToolbarsList
             foreach ($lines as $blocks) {
                 foreach ($blocks as $block) {
                     foreach ($block as & $item) {
-                        if ($decoded = json_decode($item, true)) {
+                        if (! is_array($item) && $decoded = json_decode($item, true)) {
                             $item = $decoded;
                         }
                     }



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/da10d91eda54791534d4b200dbe6d466054059d5
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.