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

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


Commits:
ff157b99 by Victor Emanouilov at 2025-12-04T14:33:03+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/ff157b996204bad0796a9fef0ae917f25cd9d0a3

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