Jump to content

Edit History

doekia

doekia

En espérant que tu ne sois pas sur PDP11

 

Ajouter un @libxml_clear_errors(); pour éviter que les flux addons polluent d'autre sections

 

Tools.php, corriger:

    public static function simplexml_load_file($url, $class_name = null)
    {
        $cache_id = 'Tools::simplexml_load_file'.$url;
        if (!Cache::isStored($cache_id)) {
            @libxml_clear_errors();
            $result = @simplexml_load_string(Tools::file_get_contents($url), $class_name);
            Cache::store($cache_id, $result);
            return $result;
        }
        return Cache::retrieve($cache_id);
    }

Module.php 7 occurences:

grep -n simplexml_load_ classes/module/Module.php
1208:        $xml_module = @simplexml_load_file($config_file);
1299:                $xml_module = @simplexml_load_file($config_file);
1463:                $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
1611:        $native_modules = @simplexml_load_file($module_list_xml);
1642:        $native_modules = @simplexml_load_file($module_list_xml);
1776:            $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
1789:                $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);

@libxml_clear_errors(); avant chacune de ces lignes

doekia

doekia

En espérant que tu ne soit pas sur PDP11

 

Ajouter un @libxml_clear_errors(); pour éviter que les flux addons polluent d'autre sections

 

Tools.php, corriger:

    public static function simplexml_load_file($url, $class_name = null)
    {
        $cache_id = 'Tools::simplexml_load_file'.$url;
        if (!Cache::isStored($cache_id)) {
            @libxml_clear_errors();
            $result = @simplexml_load_string(Tools::file_get_contents($url), $class_name);
            Cache::store($cache_id, $result);
            return $result;
        }
        return Cache::retrieve($cache_id);
    }

Module.php 7 occurences:

grep -n simplexml_load_ classes/module/Module.php
1208:        $xml_module = @simplexml_load_file($config_file);
1299:                $xml_module = @simplexml_load_file($config_file);
1463:                $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
1611:        $native_modules = @simplexml_load_file($module_list_xml);
1642:        $native_modules = @simplexml_load_file($module_list_xml);
1776:            $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
1789:                $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);

@libxml_clear_errors(); avant chacune de ces lignes

×
×
  • Create New...