Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#27975 closed defect (bug) (fixed)

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

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

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 12 years ago.
Check if index islink is set before evaluating it
27975.2.diff​ (548 bytes ) - added by jesin 11 years ago.
Update patch for latest revision and add curly braces

Download all attachments as: .zip

Change History (6)

@jesin
12 years ago

Check if index islink is set before evaluating it

#1 @jesin
12 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
12 years ago

  • Version trunk → 3.5

#3 @chriscct7
11 years ago

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

@jesin
11 years ago

Update patch for latest revision and add curly braces

#4 @wonderboymusic
11 years ago

  • Resolution → fixed
  • Status assigned → 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.