[TikiWiki-commits] [Git][tikiwiki/tiki][master] [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 <69317f78c0c1_2a17c8347304d@gitlab-sidekiq-low-urgency-cpu-bound-v2-749bb7fd7d-g5lwx.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
23ad46b8 by Victor Emanouilov at 2025-12-04T14:32:50+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
=====================================
@@ -260,7 +260,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/23ad46b8e236a3d947b36f01b6df91aa52e54302

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