Home » Networking » Net_FTP » Bug #622
ls() method throws's out errors
Details
| Submitted | 2004-01-24 21:12 UTC |
|---|---|
| From | me at oujie dot com |
| Assigned | toby |
| Status | Closed |
| Package | Net_FTP |
| PHP Version | 5.0.0b3 (beta3) |
| OS | Windows 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 :-/