firephp/firephp-core — pull request #24 by Gamesh (2014-08-22 12:16:36+00:00)
Title: Workaround for PHP bug #2801

is_resource reports false for closed resources https://bugs.php.net/bug.php?id=28016
still reproducible in php 5.4.30, encodeObject tries to is_utf8 a resource and generates an error that resource was given to mb_detect_encoding instead of string