]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-oembed.php
WordPress 3.4.2
[autoinstalls/wordpress.git] / wp-includes / class-oembed.php
index 591f017363e15842a68ef2f94e4126c7cfef9c34..f2fc024702a801b05be7f45ba13b6a5507da8ad6 100644 (file)
@@ -213,8 +213,14 @@ class WP_oEmbed {
                        $errors = libxml_use_internal_errors( 'true' );
                        $data = simplexml_load_string( $response_body );
                        libxml_use_internal_errors( $errors );
-                       if ( is_object( $data ) )
-                               return $data;
+                       if ( ! is_object( $data ) )
+                               return false;
+
+                       $return = new stdClass;
+                       foreach ( $data as $key => $value )
+                               $return->$key = (string) $value;
+
+                       return $return;
                }
                return false;
        }