Changeset 64364 in spip-zone


Ignore:
Timestamp:
Aug 3, 2012, 8:11:23 AM (7 years ago)
Author:
kent1@…
Message:

Eviter des notices PHP bis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/memoization/public/cacher.php

    r64363 r64364  
    210210// http://doc.spip.org/@public_cacher_dist
    211211function public_cacher($contexte, &$use_cache, &$chemin_cache, &$page, &$lastmodified) {
    212 
     212        $chemin_cache_session = false;
     213       
    213214        /* compat SPIP 1.9 */
    214215        if (is_null($contexte) AND function_exists('nettoyer_uri'))
     
    219220                include_spip('inc/memoization');
    220221                $cfg = @unserialize($GLOBALS['meta']['memoization']);
    221                 $memo = new MCache($cfg['pages'] ? $cfg['pages'] : $cfg['methode']);
     222                $memo = new MCache(isset($cfg['pages']) ? $cfg['pages'] : $cfg['methode']);
    222223        }
    223224
    224225        /* compat SPIP 1.9 */
    225226        if (is_array($page) AND !isset($page['entetes']['X-Spip-Cache']))
    226                 $page['duree'] = $page['entetes']['X-Spip-Cache'] = $GLOBALS['delais'];
     227                $page['duree'] = $page['entetes']['X-Spip-Cache'] = isset($GLOBALS['delais']) ? $GLOBALS['delais'] : null;
    227228
    228229        // Second appel, destine a l'enregistrement du cache sur le disque
Note: See TracChangeset for help on using the changeset viewer.