Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29628 closed defect (bug) (fixed)

Undefined variable: arg class-ftp.php:508

Reported by: hugodelgado's profile hugodelgado Owned by: dd32's profile dd32
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.0
Component: Filesystem API Keywords:
Focuses: Cc:

Description (last modified by dd32)

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");

Change History (6)

#1 @dd32
10 years ago

  • Component changed from General to Filesystem API
  • Description modified (diff)

Although this is an external library PemFTP it appears to be abandoned for development now, so we should probably just go ahead and make any alterations we need.

#2 @dd32
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#3 @dd32
10 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 29969:

Avoid a PHP Notice in the PemFTP Library by adding a missing function parameter. This parameter is unused by WordPress.
Props hugodelgado. Fixes #29628

#4 @dd32
10 years ago

In 30310:

Always use a full filesystem path when including the FTP handler in PemFTP. This prevents other files in the includes directory being scanned/included accidentally.
See #29628

#5 @TobiasBg
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

For [30310]: __DIR__ was only added in PHP 5.3.0, so we can't use it, unfortunately.
I suggest to replace it with dirname( __FILE__ ).

#6 @SergeyBiryukov
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

[30311] missed the ticket.

Note: See TracTickets for help on using tickets.