bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Support tracing of nested Closures in bw_trace_obsafe_print_r() #28

Closed bobbingwide closed 8 years ago

bobbingwide commented 8 years ago

I recently encountered a Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace.php:497

The logic to detect closures ( #23 ) only works when the Closure is in the top level array. I need to wrap a try around the attempt to serialize the array/object.

Also noted that it might be a good idea to simplify logic for empty arrays... which can get unnecessarily marked as *RECURSION*