diff --git a/src/parser/PhutilJSON.php b/src/parser/PhutilJSON.php
--- a/src/parser/PhutilJSON.php
+++ b/src/parser/PhutilJSON.php
@@ -51,7 +51,7 @@
       $object = (array)$object;
     }
 
-    if (empty($object)) {
+    if (empty($object) || !is_iterable($object)) {
       return '{}';
     }