Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 13982)
+++ wp-includes/formatting.php	(working copy)
@@ -2184,6 +2184,7 @@
  */
 function _deep_replace($search, $subject){
 	$found = true;
+	$subject = (string) $subject;
 	while($found) {
 		$found = false;
 		foreach( (array) $search as $val ) {
