Skip to content
This repository
Browse code

BUGFIX If SS_Backtrace::get_rendered_backtrace() has $plainText argument

to TRUE, ensure there is no HTML in the output.
  • Loading branch information...
commit edaed5ef7ed98addb16c10aee909c684a035c9d3 1 parent 7e3a698
Sean Harvey authored April 15, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  dev/Backtrace.php
4  dev/Backtrace.php
@@ -159,7 +159,7 @@ static function full_func_name($item, $showArgs = false, $argCharLimit = 10000)
159 159
 	 */
160 160
 	static function get_rendered_backtrace($bt, $plainText = false, $ignoredFunctions = null) {
161 161
 		$bt = self::filter_backtrace($bt, $ignoredFunctions);
162  
-		$result = "<ul>";
  162
+		$result = ($plainText) ? '' : '<ul>';
163 163
 		foreach($bt as $item) {
164 164
 			if($plainText) {
165 165
 				$result .= self::full_func_name($item,true) . "\n";
@@ -177,7 +177,7 @@ static function get_rendered_backtrace($bt, $plainText = false, $ignoredFunction
177 177
 				$result .= "</li>\n";
178 178
 			}
179 179
 		}
180  
-		$result .= "</ul>";
  180
+		if(!$plainText) $result .= '</ul>';
181 181
 		return $result;
182 182
 	}
183 183
 	

0 notes on commit edaed5e

Please sign in to comment.
Something went wrong with that request. Please try again.