r114029 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114028‎ | r114029 | r114030 >
Date:19:27, 16 March 2012
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (using backtrace does not work for free text)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_FormInput.php
@@ -301,8 +301,12 @@
302302 if ( function_exists('get_called_class') ) {
303303 $calledClass = get_called_class();
304304 } else {
305 - $bt = debug_backtrace();
306 - $calledClass = $bt[1]['args'][0][0];
 305+ if ( $input_name === 'sf_free_text' ) { // free text
 306+ $calledClass = 'SFTextAreaInput';
 307+ } else {
 308+ $bt = debug_backtrace(false);
 309+ $calledClass = $bt[1]['args'][0][0];
 310+ }
307311 }
308312
309313 $input = new $calledClass ( $sfgFieldNum, $cur_value, $input_name, $is_disabled, $other_args );

Status & tagging log