dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3099a70
)
MWDebug: Add support for passing objects
author
PranavK
<pranavmk98@gmail.com>
Sun, 4 Jan 2015 07:20:45 +0000
(12:50 +0530)
committer
TTO
<at.light@live.com.au>
Sun, 24 Jan 2016 05:55:45 +0000
(
05:55
+0000)
Change-Id: I121acab012676e486e19b3f8b0fae50af3d3a567
includes/debug/MWDebug.php
patch
|
blob
|
history
diff --git
a/includes/debug/MWDebug.php
b/includes/debug/MWDebug.php
index
8f943bf
..
4faa1dd
100644
(file)
--- a/
includes/debug/MWDebug.php
+++ b/
includes/debug/MWDebug.php
@@
-91,16
+91,16
@@
class MWDebug {
/**
* Adds a line to the log
*
- * @todo Add support for passing objects
- *
* @since 1.19
- * @param
string
$str
+ * @param
mixed
$str
*/
public static function log( $str ) {
if ( !self::$enabled ) {
return;
}
-
+ if ( !is_string( $str ) ) {
+ $str = print_r( $str, true );
+ }
self::$log[] = array(
'msg' => htmlspecialchars( $str ),
'type' => 'log',