[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Tokens: guard null/empty to avoid deprecation warnings
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <689a65b6a2606_2cd689456523@gitlab-sidekiq-low-urgency-cpu-bound-v2-554588f964-d6qrn.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
a7a9401e by Espoir Baraka at 2025-08-11T21:42:34+00:00
[FIX] Tokens: guard null/empty to avoid deprecation warnings
---
* [FIX] Tokens: guard null/empty to avoid deprecation warnings
See merge request tikiwiki/tiki!8252
- - - - -
1 changed file:
- lib/Auth/Tokens.php
Changes:
=====================================
lib/Auth/Tokens.php
=====================================
@@ -120,7 +120,7 @@ class Tokens
$skip_params = false;
$stored_entry = $data['entry'];
$storedParams = (array) json_decode($data['parameters'], true);
- if (str_starts_with($stored_entry, $tikiroot)) {
+ if (! empty($tikiroot) && str_starts_with($stored_entry, $tikiroot)) {
$stored_entry = substr($stored_entry, strlen($tikiroot));
}
$stored_entry = ltrim($stored_entry, '/'); // Remove leading slash
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a7a9401e009f7cd801a37250b0068cddd24b9e47
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a7a9401e009f7cd801a37250b0068cddd24b9e47
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