[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] PHP 8 warnings in PluginIncludeTpl when values parameter is missing

"Olivier Kango \(@olivierkango\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69493b5294e8f_2a17fcdc634a2@gitlab-sidekiq-low-urgency-cpu-bound-v2-988754444-9f6gq.mail>

Olivier Kango pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
3e361175 by Olivier Kango at 2025-12-22T14:28:41+02:00
[BP][FIX] PHP 8 warnings in PluginIncludeTpl when values parameter is missing
---
* [FIX] PHP 8 warnings in PluginIncludeTpl when values parameter is missing
---
* [FIX] simplify values parsing for PHP 8

* [FIX] PluginIncludeTpl: guard access to values parameter for PHP 8

* [FIX] Prevent PHP 8 warnings in PluginIncludeTpl when parsing values

* [FIX] PHP 8 warnings in PluginIncludeTpl when values parameter is missing

See merge request tikiwiki/tiki!9237

(cherry picked from commit 05638edb0c7fc39c569e46006a6fedb0a88e03f6)

See merge request tikiwiki/tiki!9260

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_includetpl.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_includetpl.php
=====================================
@@ -41,15 +41,15 @@ function wikiplugin_includetpl_info()
 function wikiplugin_includetpl($data, $params)
 {
     $smarty = TikiLib::lib('smarty');
-    if (stripos($params["values"], '&')) {
+    $defvalues = [];
+    if (! empty($params["values"])) {
         $paramvalues = explode('&', $params["values"]);
-        foreach ($paramvalues as $key => $value) {
-            $tempvalues = explode(':', $value);
-            $defvalues[$tempvalues[0]] = $tempvalues[1];
+        foreach ($paramvalues as $value) {
+            $tempvalues = explode(':', $value, 2);
+            if (isset($tempvalues[1])) {
+                $defvalues[$tempvalues[0]] = $tempvalues[1];
+            }
         }
-    } else {
-        $tempvalues = explode(':', $params["values"]);
-        $defvalues[$tempvalues[0]] = $tempvalues[1];
     }
 
     $smarty->assign('values', $defvalues);



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

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