Let's see if I can help out!
Line 69 includes the foreach which iterates over the contents found in $contents, which is populated by ftp_nlist. It would seem that the ftp connection was successful, but are you sure you are providing the proper directory name and location on the remote server? For some reason, $contents is empty which implies the directory you provided is wrong or empty.
You might need to use the full path, and not a relative path, this is especially important depending on how your host has their accounts set up. Example:
Certain hosts allow you to use /httpdocs as a location if your account is set up in such a manner that supports it. But others force you to actually use the full path:
/var/www/vhosts/domain.com/httpdocs