I18n.php
[Pman.Core] / I18n.php
index 403b29e..9d403d9 100644 (file)
--- a/I18n.php
+++ b/I18n.php
@@ -287,8 +287,11 @@ class Pman_Core_I18n extends Pman
         }
         $target = ini_get('session.save_path').'/eurofxref-daily.xml';
         if (!file_exists($target) || filemtime($target) < (time() - 60*60*24)) {
-            $f = file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
+            // this may fail...
+            $f = @file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
             if (!strlen($f)) {
+                $target = dirname(__FILE__).'eurofxref-daily.xml';
+                
                 return false;
             }
             file_put_contents($target,$f);