Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0037237mantisbtprintingpublic2026-06-03 12:02
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2.27.0 
Target Version2.28.4 
Summary0037237: Printing an issue having notes without text triggers PHP error
Description

When executing print_all_bug_page_word.php to print an Issue that has bugnotes without text (i.e. bugnote.note = null), a PHP error is triggered:

INTERNAL APPLICATION ERROR

MantisMarkdown::convert(): Argument 1 ($p_string) must be of type string, null given, called in.../mantisbt/plugins/MantisCoreFormatting/MantisCoreFormatting.php on line 195

Stack trace

#   Filename    Line    Class   Type    Function    Args
0   .../mantisbt/plugins/MantisCoreFormatting/MantisCoreFormatting.php  195     MantisMarkdown  ->  convert     -
1   .../mantisbt/core/event_api.php     214     MantisCoreFormattingPlugin  ->  formatted   -
2   .../mantisbt/core/event_api.php     310     -   -   event_callback  -
3   .../mantisbt/core/event_api.php     183     -   -   event_type_chain    -
4   .../mantisbt/core/string_api.php    166     -   -   event_signal    -
5   .../mantisbt/print_all_bug_page_word.php    531     -   -   string_display_links
Additional Information

This is a regression introduced by commit MantisBT master 3aec6e68 (see 0034040) which introduced typed parameter on MantisMarkdown::convert()

TagsNo tags attached.

Relationships

related to 0034040 closedcommunity Markdown processing code cleanup (part 2) 

Activities

dregad

dregad

2026-06-03 12:02

developer   ~0071219

without text (i.e. bugnote.note = null)

For the record, this is not a normal situation, it happens when there is no bugnote_text record matching bugnote_text_id.

We should make sure that BugnoteData::$note does not contain null - it should always be a string.