aggiungo la funzione che mi causa l'errore
function write($file, $buffer)
{
// Initialize variables
jimport('joomla.client.helper');
$FTPOptions = JClientHelper::getCredentials('ftp');
// If the destination directory doesn't exist we need to create it
if (!file_exists(dirname($file))) {
jimport('joomla.filesystem.folder');
JFolder::create(dirname($file));
}
if ($FTPOptions['enabled'] == 1) {
// Connect the FTP client
jimport('joomla.client.ftp');
$ftp = & JFTP::getInstance($FTPOptions['host'], $FTPOptions['port'], null, $FTPOptions['user'], $FTPOptions['pass']);
// Translate path for the FTP account and use FTP write buffer to file
$file = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $file), '/');
$ret = $ftp->write($file, $buffer);
} else {
$file = JPath::clean($file);
problema--------------->$ret = file_put_contents($file, $buffer);
}
return $ret;
}