PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_FTP » Bug #622

ls() method throws's out errors

Details

Submitted2004-01-24 21:12 UTC
Fromme at oujie dot com
Assignedtoby
StatusClosed
PackageNet_FTP
PHP Version5.0.0b3 (beta3)
OSWindows XP
Roadmaps(Not assigned)

Comments

[2004-01-24 21:12 UTC] me at oujie dot com

Description:
------------
I've created a new object, connected & logged in to the server, changed the Directory and then wanted to list all (dirs, files, doesn't matter).
The method ls () throws out an error:

both (dirs and files):
Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 865

dirs:
Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 891

files:
Fatal error: Cannot use object of type pear_error as array in D:\Webserver\PHP\PEAR\Net\FTP.php on line 905

Is it a problem with using PHP5 (b3) or a general? Also, I can't find the error, I don't have any idea why this doesn't works.

Reproduce code:
---------------
<?php

require_once 'Net/FTP.php';

$host = 'xxx'; $port = '21';
$username = 'xxx'; $password = 'xxx';

$ftp = new Net_FTP ($host, $port);
$ftp->connect ();
$ftp->login ($username, $password);
$ftp->cd ('hosting');

$ftp->ls($ftp->pwd ());

$ftp->disconnect ();

?>

Expected result:
----------------
I get 2 lines. The first line is the "status" of the connection, featuring:

string(57) "drwx---r-t 10 <username> ftpusers 4096 Jan 24 16:04 .."

<username> is the username I've used to connect to the FTP-Server. On the next line the error is thrown out.

[2004-01-25 03:24 UTC] me at oujie dot com

I'm sorry, but I can't find any CVS-Version (also I can't find the informations how to get on the CVS-Server). I only find "Download Latest Version" but this is 1.2-stable :-/