/** * Method to store a file to the FTP server * * @param string $local Path to local file to store on the FTP server * @param string $remote FTP path to file to create * * @throws Exception * * @return boolean True if successful */ public function store($local, $remote = null) { //-- Avoid all this mess by throwing appropriate exceptions !! if (false === parent::store($local, $remote)) { throw new Exception(JError::getError()); } }