[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [FIX] guard against Text field length string function calls against nulls

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69317f8dd7eb2_2a5ef3584211b@gitlab-sidekiq-low-urgency-cpu-bound-v2-749bb7fd7d-2s8rg.mail>

Victor Emanouilov pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
705a6f23 by Victor Emanouilov at 2025-12-04T14:33:12+02:00
[FIX] guard against Text field length string function calls against nulls

- - - - -


1 changed file:

- lib/core/Tracker/Field/Text.php


Changes:

=====================================
lib/core/Tracker/Field/Text.php
=====================================
@@ -243,7 +243,7 @@ class Tracker_Field_Text extends \Tracker\Field\AbstractItemField implements \Tr
     {
         $length = $this->getOption('max');
 
-        if ($length) {
+        if ($length && ! is_null($value)) {
             $f_len = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';
             $f_substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';
 



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

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