]> git.mxchange.org Git - friendica.git/commitdiff
suppress parse warnings
authorFriendika <info@friendika.com>
Wed, 9 Feb 2011 04:55:34 +0000 (20:55 -0800)
committerFriendika <info@friendika.com>
Wed, 9 Feb 2011 04:55:34 +0000 (20:55 -0800)
boot.php
include/oembed.php

index 8492b8be077d71633f5c20df5549bc0f98072447..3edd45971ee5816a1db633b3134708dee5670f0c 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -3,7 +3,7 @@
 set_time_limit(0);
 
 define ( 'BUILD_ID',               1038   );
-define ( 'FRIENDIKA_VERSION',      '2.10.0905' );
+define ( 'FRIENDIKA_VERSION',      '2.10.0906' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.1'  );
 
 define ( 'EOL',                    "<br />\r\n"     );
index 37923a877bf7193f44f862fa1920360fdbf66029..4d6b0af16c7581b1f7cbf7b58bebc9be7915a2d2 100644 (file)
@@ -79,7 +79,10 @@ function oe_get_inner_html( $node ) {
  * and replace it with [embed]url[/embed]
  */
 function oembed_html2bbcode($text) {
-       $dom = DOMDocument::loadHTML($text);
+       // If it doesn't parse at all, just return the text.
+       $dom = @DOMDocument::loadHTML($text);
+       if(! $dom)
+               return $text;
        $xpath = new DOMXPath($dom);
        $attr = "oembed";