Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

multiple calls on handleError fail #5

Open
luc456 opened this issue Jun 17, 2014 · 0 comments
Open

multiple calls on handleError fail #5

luc456 opened this issue Jun 17, 2014 · 0 comments

Comments

@luc456
Copy link

luc456 commented Jun 17, 2014

Hi,
I would create the tree /dir1/dir2 on FTP (the dir1 doesn't exist on FTP) in this way:

$gftp = new GFtpComponent('ftp://user:pass@localhost', 120, false);
$parts = explode('/', 'dir1/dir2');
foreach($parts as $part) {
try {
$gftp->chdir($part);
} catch (GFtpException $e) {
$gftp->mkdir($part);
$gftp->chdir($part);
}
}

On first cycle of foreach chdir('dir1') throw an exception, it is catched and dir1 is created.
On second cycle of foreach chdir('dir2') program raise an error which is not handled by handleError GFtpUtils.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant