Changeset 11657
- Timestamp:
- 06/27/2009 10:12:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-simplepie.php
r11599 r11657 752 752 function __destruct() 753 753 { 754 if ( version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled())754 if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) 755 755 { 756 756 if (!empty($this->data['items'])) … … 1687 1687 $headers = $file->headers; 1688 1688 $data = $file->body; 1689 $sniffer = new $this->content_type_sniffer_class($file);1689 $sniffer =& new $this->content_type_sniffer_class($file); 1690 1690 $sniffed = $sniffer->get_type(); 1691 1691 } … … 1965 1965 if ($file->success && ($file->status_code == 200 || ($file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0) 1966 1966 { 1967 $sniffer = new $this->content_type_sniffer_class($file);1967 $sniffer =& new $this->content_type_sniffer_class($file); 1968 1968 if (substr($sniffer->get_type(), 0, 6) === 'image/') 1969 1969 { … … 3086 3086 function __destruct() 3087 3087 { 3088 if ( version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled())3088 if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) 3089 3089 { 3090 3090 unset($this->feed); … … 7745 7745 case 'gzip': 7746 7746 case 'x-gzip': 7747 $decoder = new SimplePie_gzdecode($this->body);7747 $decoder =& new SimplePie_gzdecode($this->body); 7748 7748 if (!$decoder->parse()) 7749 7749 { … … 10543 10543 function entities_decode($data) 10544 10544 { 10545 $decoder = new SimplePie_Decode_HTML_Entities($data);10545 $decoder =& new SimplePie_Decode_HTML_Entities($data); 10546 10546 return $decoder->parse(); 10547 10547 } … … 10939 10939 if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E")) 10940 10940 { 10941 $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8'));10941 $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8')); 10942 10942 if ($parser->parse()) 10943 10943 { … … 10952 10952 if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00")) 10953 10953 { 10954 $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8'));10954 $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8')); 10955 10955 if ($parser->parse()) 10956 10956 { … … 10965 10965 if ($pos = strpos($data, "\x00\x3F\x00\x3E")) 10966 10966 { 10967 $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8'));10967 $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8')); 10968 10968 if ($parser->parse()) 10969 10969 { … … 10978 10978 if ($pos = strpos($data, "\x3F\x00\x3E\x00")) 10979 10979 { 10980 $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8'));10980 $parser =& new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8')); 10981 10981 if ($parser->parse()) 10982 10982 { … … 10991 10991 if ($pos = strpos($data, "\x3F\x3E")) 10992 10992 { 10993 $parser = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));10993 $parser =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); 10994 10994 if ($parser->parse()) 10995 10995 { … … 11717 11717 if (!isset($cache[get_class($this)])) 11718 11718 { 11719 if (extension_loaded('Reflection')) 11720 { 11721 $class = new ReflectionClass(get_class($this)); 11722 $methods = $class->getMethods(); 11723 $all_methods = array(); 11724 foreach ($methods as $method) 11725 { 11726 $all_methods[] = $method->getName(); 11727 } 11728 } 11729 else 11730 { 11731 $all_methods = get_class_methods($this); 11732 } 11719 $all_methods = get_class_methods($this); 11733 11720 11734 11721 foreach ($all_methods as $method) … … 11757 11744 if (!$object) 11758 11745 { 11759 $object = new SimplePie_Parse_Date;11746 $object =& new SimplePie_Parse_Date; 11760 11747 } 11761 11748 return $object; … … 12792 12779 if ($this->file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) 12793 12780 { 12794 $sniffer = new $this->content_type_sniffer_class($this->file);12781 $sniffer =& new $this->content_type_sniffer_class($this->file); 12795 12782 if ($sniffer->get_type() !== 'text/html') 12796 12783 { … … 12838 12825 if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) 12839 12826 { 12840 $sniffer = new $this->content_type_sniffer_class($file);12827 $sniffer =& new $this->content_type_sniffer_class($file); 12841 12828 $sniffed = $sniffer->get_type(); 12842 12829 if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) … … 13066 13053 if (substr($data, 0, 5) === '<?xml' && strspn(substr($data, 5, 1), "\x09\x0A\x0D\x20") && ($pos = strpos($data, '?>')) !== false) 13067 13054 { 13068 $declaration = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5));13055 $declaration =& new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); 13069 13056 if ($declaration->parse()) 13070 13057 {
Note: See TracChangeset
for help on using the changeset viewer.