Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#51029 closed defect (bug) (fixed)

Typo in variable name causes warning from fclose()

Reported by: gothick@… Owned by: SergeyBiryukov
Priority: normal Milestone: 5.5.1
Component: Filesystem API Version: 5.5
Severity: minor Keywords: commit fixed-major
Cc: Focuses:

Description

PHP warning emitted when get_contents() calls fclose($temphangle) (should be $temphandle) in class-wp-filesystem-ftpext.php during ftp self-update.

PHP message: PHP Warning:  fclose() expects parameter 1 to be resource, null given in /var/www/user-rw/splendid-things.co.uk/wp/site/wp-admin/includes/class-wp-filesystem-ftpext.php on line 159', referer: https://splendid-things.co.uk/wp-admin/network/update.php?action=update-selected-themes&themes=twentyeleven%2Ctwentyfifteen%2Ctwentyfourteen%2Ctwentynineteen%2Ctwentyten%2Ctwentythirteen%2Ctwentytwelve%2Ctwentytwenty&_wpnonce=f7cde49708

Change History (5)

#1 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review → 5.5.1

Hi there, welcome to WordPress Trac! Thanks for the report.

This is indeed a regression in 5.5, introduced in [48089] / #49542.

#2 @SergeyBiryukov
6 years ago

  • Component Upgrade/Install → Filesystem API

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 48797:

Filesystem API: Use correct variable when closing the file handle in WP_Filesystem_FTPext::get_contents().

Props gothick@….
Fixes #51029.

#4 @SergeyBiryukov
6 years ago

  • Keywords commit fixed-major added
  • Resolution fixed
  • Status closed → reopened

Reopening for the 5.5 branch.

#5 @SergeyBiryukov
6 years ago

  • Resolution → fixed
  • Status reopened → closed

In 48803:

Filesystem API: Use correct variable when closing the file handle in WP_Filesystem_FTPext::get_contents().

Props gothick@….
Merges [48797] to the 5.5 branch.
Fixes #51029.

Note: See TracTickets for help on using tickets.