WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#51029 closed defect (bug) (fixed)

Typo in variable name causes warning from fclose()

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

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
3 months ago

  • Milestone changed from Awaiting Review to 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
3 months ago

  • Component changed from Upgrade/Install to Filesystem API

#3 @SergeyBiryukov
3 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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
3 months ago

  • Keywords commit fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for the 5.5 branch.

#5 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to 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.