View Issue Details

IDProjectCategoryView StatusLast Update
0012373mantisbtotherpublic2014-12-08 02:08
Reportergthomas Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0dev 
Target Version1.3.0-beta.1 
Summary0012373: log_event doesn't log simple string logs
Description

$s_msg doesn't get value if $p_msg is not an array.

Additional Information

patch attached.

Tagspatch
Attached Files
log_msg-d6c80ca.patch (389 bytes)   
diff --git a/core/logging_api.php b/core/logging_api.php
old mode 100644
new mode 100755
index d6c80ca..e8bffe6
--- a/core/logging_api.php
+++ b/core/logging_api.php
@@ -67,6 +67,7 @@ function log_event( $p_level, $p_msg, $p_backtrace = null ) {
 		$s_msg = var_export( $p_msg, true );
 	} else {
 		$t_event = array( $p_msg, 0 );
+		$s_msg = $p_msg;
 	}
 
 	if( $p_backtrace === null ) {
log_msg-d6c80ca.patch (389 bytes)   

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0012367 closeddhx logging_api: Undefined variable: s_msg 

Activities

dhx

dhx

2010-09-21 21:12

reporter   ~0026834

Thanks for the patch, I've committed it :)

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036479

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master bc9b2dea

2010-09-21 21:06

gthomas

Committer: dhx


Details Diff
Fix 0012373: log_event doesn't log simple strings

$s_msg doesn't get a value if $p_msg is an array. When $s_msg is used
later on in the function it will be undefined, throwing an error.

This is solved by giving $s_msg a value when $p_msg is an array.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012373
mod - core/logging_api.php Diff File