Hello,

Here are the error & warning, seems related to (incomplete) porting to D7:

1)
Fatal error: Call to undefined function file_directory_path() in /sites/all/modules/savetoftp/savetoftp.files.inc on line 16

2)
Notice: Trying to get property of non-object in savetoftp_form_alter() (line 93 of /sites/all/modules/savetoftp/savetoftp.module).

Comments

witoszek’s picture

Hello

i've got one of two:

Fatal error: Call to undefined function file_directory_path() in savetoftp.files.inc on line 16

ashutosh_anand’s picture

Assigned: Unassigned » ashutosh_anand
Issue summary: View changes
Status: Active » Closed (fixed)

Fix for both issues:

1. Add a function file_directory_path() in /sites/all/modules/savetoftp/savetoftp.files.inc

/**
* To handle D7 undefined function file_directory_path()
* Returns A string containing the path to Drupal's 'files' directory.
*/
function file_directory_path() {
	$path =  variable_get('file_' . file_default_scheme() . '_path', conf_path() . '/files');
	return $path;
}

This will take care of undefined function file_directory_path.

2. Trying to get property of non-object in savetoftp_form_alter():

Edit function savetoftp_form_alter() in /sites/all/modules/savetoftp/savetoftp.module
Replace
if (is_numeric($node->nid))
with
if ((isset($node->nid)) && is_numeric($node->nid))