Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#57680 closed enhancement (fixed)

comment return description not define

Reported by: patelmohip's profile patelmohip Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: docs Cc:

Description

1)
file_path

wp-admin\includes\class-theme-installer-skin.php

function name: hide_process_failed

line number: 69

file_path

wp-admin\includes\class-wp-automatic-updater.php

function name: is_disabled

line number: 31

Attachments (2)

57680.patch (2.4 KB) - added by patelmohip 2 years ago.
patch added
57680.diff (1.2 KB) - added by sakibmd 2 years ago.

Download all attachments as: .zip

Change History (9)

@patelmohip
2 years ago

patch added

#1 @jrf
2 years ago

@patelmohip Thanks for the ticket and patch.

<?php
@return true|array True if automatic_updater is disable and wp_installing() available. Array with the test results.

If I look at the code, this is incorrect. The return value should always be a boolean. true for the first two code paths, true|false for the last.
And yes, while a filter can return anything, the filter is documented to filter a bool value, so should return a bool.

@sakibmd
2 years ago

#2 @sakibmd
2 years ago

Please take a look at my patch @patelmohip and @jrf. I think this looks better now.

#3 @akmelias
2 years ago

Thanks, @sakibmd I have checked your patch and I think it looks good.

#4 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 6.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @SergeyBiryukov
2 years ago

In 55594:

Docs: Add missing @return tag for WP_Automatic_Updater::is_disabled().

Follow-up to [25421], [25823], [25859].

Props sakibmd, jrf, patelmohip, akmelias.
See #57680.

#6 @SergeyBiryukov
2 years ago

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

In 55595:

Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer.

Follow-up to [48390].

Props sakibmd, jrf, patelmohip, akmelias.
Fixes #57680.

#7 @SergeyBiryukov
2 years ago

  • Component changed from Comments to Upgrade/Install
  • Focuses coding-standards removed
Note: See TracTickets for help on using tickets.