Add flag to HTMLTextField to not persist submitted data
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 7ed5fba..3fa91fa 100644 (file)
@@ -1557,7 +1557,7 @@ function wfDebugBacktrace( $limit = 0 ) {
                return [];
        }
 
-       if ( $limit && version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
+       if ( $limit ) {
                return array_slice( debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit + 1 ), 1 );
        } else {
                return array_slice( debug_backtrace(), 1 );
@@ -1738,7 +1738,7 @@ function wfEscapeWikiText( $text ) {
                                $repl2[] = preg_quote( substr( $prot, 0, -1 ), '/' );
                        }
                }
-               $repl2 = $repl2 ? '/\b(' . join( '|', $repl2 ) . '):/i' : '/^(?!)/';
+               $repl2 = $repl2 ? '/\b(' . implode( '|', $repl2 ) . '):/i' : '/^(?!)/';
        }
        $text = substr( strtr( "\n$text", $repl ), 1 );
        $text = preg_replace( $repl2, '$1:', $text );