[TikiWiki-commits] [Git][tikiwiki/tiki][master] 2 commits: [FIX] phpunit: tr() couldn't be resolved when running tests locally on recent...

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a90889a4b5c7_3818dbd4725f9@gitlab-sidekiq-low-urgency-cpu-bound-v2-56dfdb9fd8-wjwbz.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
61ecd03d by Benoit Grégoire at 2026-08-27T14:20:43-04:00
[FIX] phpunit:  tr() couldn't be resolved when running tests locally on recent php versions yet it worked on CI.

- - - - -
dca6b6c2 by Benoit Grégoire at 2026-08-27T14:33:15-04:00
[FIX] lib/smarty_tiki/FunctionHandler/Button.php: Fix warning in unit tests

- - - - -


2 changed files:

- lib/smarty_tiki/FunctionHandler/Button.php
- lib/trackers/trackerlib.php


Changes:

=====================================
lib/smarty_tiki/FunctionHandler/Button.php
=====================================
@@ -220,7 +220,7 @@ class Button extends Base implements TikiSmartyExtensionInterface
                 unset($params['_type']);
             }
 
-            $url = str_replace('+', ' ', str_replace('&amp;', '&', urldecode($_SERVER['REQUEST_URI'])));
+            $url = str_replace('+', ' ', str_replace('&amp;', '&', urldecode($_SERVER['REQUEST_URI'] ?? ''))); //In unit tests or indexing, REQUEST_URI won't be present
             $encoded_html = htmlentities($html);
             $dom = new \DOMDocument();
 


=====================================
lib/trackers/trackerlib.php
=====================================
@@ -30,6 +30,8 @@
  */
 define('HISTLIB_INVALID_FIELDID_THAT_MEANS_TRACKER_ITEM_STATUS_CHANGE', -1);
 
+require_once(__DIR__ . '/../init/tra.php');  //This is required when running phpunit under recent php versions.
+
 use Tiki\Tracker\TrackerConfigHistory;
 
 /**



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/a0f9130636a94e07136b7321a6f81f4c353aa159...dca6b6c26381228a892d61f380f46cdd8e91fe43

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/compare/a0f9130636a94e07136b7321a6f81f4c353aa159...dca6b6c26381228a892d61f380f46cdd8e91fe43
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
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.