Work around infinite memory consumption bug. CRM-17853
authorJulia Longtin <julia.longtin@gmail.com>
Thu, 21 Jan 2016 22:18:33 +0000 (22:18 +0000)
committerJulia Longtin <julia.longtin@gmail.com>
Thu, 21 Jan 2016 22:18:33 +0000 (22:18 +0000)
When handling an Unhandled exception, the default error handler path uses debug_var to handle outputting debug information. When calling debug_var, no print argument is passed. Without a print argument, debug_var uses print_r to dump a passed in variable's contents. This consumes all memory, and leads to a crash (500). passing a different option to debug_var works around the issue.

CRM/Core/Error.php

index 615606eb103182e70431b25fb10a2c8b9d450b35..387ba23999b4f8cfc55018644c309b5865935f06 100644 (file)
@@ -440,7 +440,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
     // Case C: Default error handler
 
     // log to file
-    CRM_Core_Error::debug_var('Fatal Error Details', $vars);
+    CRM_Core_Error::debug_var('Fatal Error Details', $vars, FALSE);
     CRM_Core_Error::backtrace('backTrace', TRUE);
 
     // print to screen