DataObjects/core.sql
[Pman.Core] / I18n.php
index db8597c..009c26d 100644 (file)
--- a/I18n.php
+++ b/I18n.php
@@ -290,9 +290,12 @@ class Pman_Core_I18n extends Pman
             // this may fail...
             $f = @file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
             if (!strlen($f)) {
-                return false;
+                $target = dirname(__FILE__).'/eurofxref-daily.xml';
+                
+                
+            } else {
+                file_put_contents($target,$f);
             }
-            file_put_contents($target,$f);
         } 
         $dom = simplexml_load_file($target);
         $this->rates['EUR'] = 1.0;