diff options
-rw-r--r-- | it_text.class | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/it_text.class b/it_text.class index 3d48d96..c920941 100644 --- a/it_text.class +++ b/it_text.class @@ -52,7 +52,7 @@ function it_text($p = array()) foreach ((array)$p['phpfile'] as $phpfile) { $oldtext = $this->statictext; - if (is_array($ret = @include($phpfile))) + if (is_array($ret = include($phpfile))) $this->statictext += $ret; else $this->statictext = $oldtext + $this->statictext; # FIXME: compatibility mode @@ -238,7 +238,8 @@ function dump_php() $this->statictext = array_merge(array('_' => $text['_']), $text); $oldmask = umask(002); - if ($f = fopen($this->p['phpfile'], 'w')) + $phpfiles = (array)$this->p['phpfile']; + if ($f = fopen(count($phpfiles) == 1 ? $phpfiles[0] : null, 'w')) { $result = (fputs($f, '<?php return ' . strtr(var_export($this->statictext, true), array("=> \n array (" => "=> array(", "array (\n '_'" => "array(\n'_'", "\n ),\n " => "\n),\n", "\n ),\n" => "\n),\n", "\r" => "")) . ";\n?>\n") !== false); fclose($f); |