diff --git a/src/Pluf/L10n.php b/src/Pluf/L10n.php index 209125c..e4a2e57 100644 --- a/src/Pluf/L10n.php +++ b/src/Pluf/L10n.php @@ -140,12 +140,9 @@ class Pluf_L10n .str_replace(DIRECTORY_SEPARATOR, '_', substr($file, 0, -5)) .'.php'; $lines = file($file); - if (false === ($fp = @fopen($phpfile,'w'))) { - return false; - } - fputs($fp, ''); - @fclose($fp); + $out .= 'return $l;'."\n\n".'?>'; + file_put_contents($phpfile, $out, LOCK_EX); @chmod($phpfile, 0777); return true; }