[wp-trac] [WordPress Trac] #29628: Undefined variable: arg class-ftp.php:508

WordPress Trac noreply at wordpress.org
Fri Sep 12 00:54:39 UTC 2014


#29628: Undefined variable: arg  class-ftp.php:508
----------------------------+------------------------------
 Reporter:  hugodelgado     |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  4.0
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------
Changes (by dd32):

 * component:  General => Filesystem API


Old description:

> Notice: Undefined variable: arg in wp-admin/includes/class-ftp.php on
> line 508. It has an easy fix:
>
> where is:
>         function nlist($pathname="") {
>                 return $this->_list(($arg?" ".$arg:"").($pathname?"
> ".$pathname:""), "NLST", "nlist");
>         }
> should be:
>         function nlist($pathname="", arg="") {
>                 return $this->_list(($arg?" ".$arg:"").($pathname?"
> ".$pathname:""), "NLST", "nlist");
>         }

New description:

 Notice: Undefined variable: arg in wp-admin/includes/class-ftp.php on line
 508. It has an easy fix:

 where is:
 {{{
         function nlist($pathname="") {
                 return $this->_list(($arg?" ".$arg:"").($pathname?"
 ".$pathname:""), "NLST", "nlist");
         }
 }}}
 should be:
 {{{
         function nlist($pathname="", arg="") {
                 return $this->_list(($arg?" ".$arg:"").($pathname?"
 ".$pathname:""), "NLST", "nlist");
         }
 }}}

--

Comment:

 Although this is an external library
 [http://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
 PemFTP] it appears to be abandoned for development now, so we should
 probably just go ahead and make any alterations we need.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29628#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list