Changeset 52393 for trunk/src/wp-includes/SimplePie/Locator.php
- Timestamp:
- 12/20/2021 07:31:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/Locator.php
r49176 r52393 65 65 var $force_fsockopen = false; 66 66 var $curl_options = array(); 67 var $dom; 67 68 protected $registry; 68 69 … … 76 77 $this->curl_options = $curl_options; 77 78 78 if (class_exists('DOMDocument') )79 if (class_exists('DOMDocument') && $this->file->body != '') 79 80 { 80 81 $this->dom = new DOMDocument(); 81 82 82 83 set_error_handler(array('SimplePie_Misc', 'silence_errors')); 83 $this->dom->loadHTML($this->file->body); 84 try 85 { 86 $this->dom->loadHTML($this->file->body); 87 } 88 catch (Throwable $ex) 89 { 90 $this->dom = null; 91 } 84 92 restore_error_handler(); 85 93 }
Note: See TracChangeset
for help on using the changeset viewer.