Make WordPress Core

Opened 10 months ago

Closed 8 months ago

Last modified 8 months 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 10 months ago.
patch added
57680.diff (1.2 KB) - added by sakibmd 10 months ago.

Download all attachments as: .zip

Change History (9)

@patelmohip
10 months ago

patch added

#1 @jrf
10 months 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
10 months ago

#2 @sakibmd
10 months ago

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

#3 @akmelias
10 months ago

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

#4 @SergeyBiryukov
8 months ago

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

#5 @SergeyBiryukov
8 months 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
8 months 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
8 months ago

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