Dotclear

Ticket #317 (closed enhancement: fixed)

Opened 17 years ago

Last modified 17 years ago

dt::getZones - Erreur non-gérée si tz.dat est inaccessible

Reported by: sacha Owned by: olivier
Priority: lowest Milestone: 2.0
Component: module:core Version: 2.0 RC2
Severity: trivial Keywords:
Cc:

Description

Si pour une raison quelconque tz.dat est inaccessible dans le dossier common de Clearbricks, des avertissements PHP sont affichées, alors qu'un tableau vide devrait être retourné, parce que file() ne lance pas d'exceptions.

On peut changer les lignes 123-7 actuelles de common/lib.date.php

		try {
			$tz =  file(dirname(__FILE__).'/tz.dat');
		} catch (Exception $e) {
			return array();
		}

en :

		if (!is_readable($f = dirname(__FILE__).'/tz.dat')) {
			return array();
		}
		
		$tz =  file($f);

Change History

comment:1 Changed 17 years ago by olivier

  • Status changed from new to closed
  • Resolution set to fixed

Réglé dans la révision 154 de Clearbricks.

Note: See TracTickets for help on using tickets.

Sites map