/[drupal]/contributions/modules/fooaggregator/parsers/simplexml/fa_simplexml.module
ViewVC logotype

Diff of /contributions/modules/fooaggregator/parsers/simplexml/fa_simplexml.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.9, Fri Nov 23 23:07:16 2007 UTC revision 1.1.2.10, Sat Nov 24 14:04:38 2007 UTC
# Line 1  Line 1 
1  <?php // -*-php-*-  <?php // -*-php-*-
2  /* $Id: fa_simplexml.module,v 1.1.2.8 2007/11/22 15:11:49 alaa Exp $ */  /* $Id: fa_simplexml.module,v 1.1.2.9 2007/11/23 23:07:16 alaa Exp $ */
3    
4  /**  /**
5   * Implementation of hook_fooaggregatorapi()   * Implementation of hook_fooaggregatorapi()
# Line 43  function _fa_simplexml_refresh(&$feed, $ Line 43  function _fa_simplexml_refresh(&$feed, $
43    // We got a malformed XML    // We got a malformed XML
44    if ($parsed_xml === FALSE || $parsed_xml == NULL) {    if ($parsed_xml === FALSE || $parsed_xml == NULL) {
45      $error = libxml_get_last_error();      $error = libxml_get_last_error();
46      if (function_exists('iconv') && $error->code == 9) {  
47        //unicode errors are the most common cause of failed parsing
48        if (function_exists('iconv')) {
49        $xml = iconv("UTF-8", "UTF-8//IGNORE", $xml);        $xml = iconv("UTF-8", "UTF-8//IGNORE", $xml);
50        _fa_simplexml_refresh($feed, $xml);        _fa_simplexml_refresh($feed, $xml);
51        $xml = null;        $xml = null;

Legend:
Removed from v.1.1.2.9  
changed lines
  Added in v.1.1.2.10

  ViewVC Help
Powered by ViewVC 1.1.2