Kaya Posted February 23, 2016 Report Share Posted February 23, 2016 The mds_template() function crashes on any value that evaluates to false: Example: [spoiler] content: Template values:<br/> 0:[[zero]]<br/> '0':[[zerostring]]<br/> '':[[mptystring]]<br/> null:[[null]]<br/> FALSE:[[false]]<br/> ' ':[[space]]<br/> code: (locations 1_-1x2_1) @tpl['zero'] = 0; @tpl['zerostring'] = '0'; @tpl['mptystring'] = ''; @tpl['null'] = null; @tpl['false'] = FALSE; @tpl['space'] = ' '; mds_template(@content[0], @tpl); output: #Could not find matching value for template keyword '[[zero]]'. #Could not find matching value for template keyword '[[zerostring]]'. #Could not find matching value for template keyword '[[mptystring]]'. #Could not find matching value for template keyword '[[null]]'. #Could not find matching value for template keyword '[[false]]'. [/spoiler] It seems like there is an isset() missing in the template code. One way to work around this is by appending a space to each value to make sure they are no longer empty. (As extra spaces are normally ignored in HTML) Quote Link to comment Share on other sites More sharing options...
Root Admin Chewett Posted August 3, 2021 Root Admin Report Share Posted August 3, 2021 @Fyrd Argentus is this bug still a bug do you know? Quote Link to comment Share on other sites More sharing options...
Fyrd Argentus Posted August 4, 2021 Report Share Posted August 4, 2021 I have never used this function. Would you like me to test? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.