WordPress.org

Make WordPress Core

Changeset 22970


Ignore:
Timestamp:
12/02/12 16:43:12 (17 months ago)
Author:
nacin
Message:

SimplePie: Return nothing and throw an error in SimplePie_Sanitize when DOMDocument is disabled.

Note that when SimplePie is used through the WordPress fetch_feed() function, we use kses rather than SimplePie_Sanitize, which removes the dependency on DOMDocument. This change is only for plugins using SimplePie directly.

props rmccue. fixes #21990.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/SimplePie/Sanitize.php

    r22798 r22970  
    248248            { 
    249249 
     250                if (!class_exists('DOMDocument')) 
     251                { 
     252                    $this->registry->call('Misc', 'error', array('DOMDocument not found, unable to use sanitizer', E_USER_WARNING, __FILE__, __LINE__)); 
     253                    return ''; 
     254                } 
    250255                $document = new DOMDocument(); 
    251256                $document->encoding = 'UTF-8'; 
Note: See TracChangeset for help on using the changeset viewer.