Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#27975 closed defect (bug) (fixed)

On windows host using ftp, the 'islink' key is not available

Reported by: joostdekeijzer's profile joostdekeijzer Owned by: chriscct7's profile chriscct7
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.5
Component: Filesystem API Keywords: has-patch commit
Focuses: administration Cc:

Description

WP_Filesystem_FTPext::parselisting creates the $b array. Almost near the end of the method the value of $islink? is tested but that key isn't set on windows servers.

https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php#L356

Either set the islink key (to false) on windows servers or move the islink test to the "not windows" part of the if-elseif.

Attachments (2)

27975.diff (525 bytes) - added by jesin 11 years ago.
Check if index islink is set before evaluating it
27975.2.diff (548 bytes) - added by jesin 10 years ago.
Update patch for latest revision and add curly braces

Download all attachments as: .zip

Change History (6)

@jesin
11 years ago

Check if index islink is set before evaluating it

#1 @jesin
11 years ago

  • Keywords has-patch added

Calling WP_Filesystem_FTPext::parselisting( $line ) on Windows displays the following notice.

Notice: Undefined index: islink in /var/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 357

The patch checks if $b['islink'] is set before checking its value.

#2 @jesin
11 years ago

  • Version changed from trunk to 3.5

#3 @chriscct7
10 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.4
  • Owner set to chriscct7
  • Status changed from new to assigned

@jesin
10 years ago

Update patch for latest revision and add curly braces

#4 @wonderboymusic
10 years ago

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

In 35476:

Filesystem: in WP_Filesystem_FTPext::parselisting(), check for the existence of $b['islink'] before using it.

Props jesin.
Fixes #27975.

Note: See TracTickets for help on using tickets.