Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#57680 closed enhancement (fixed)

comment return description not define

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

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 4 years ago.
patch added
57680.diff​ (1.2 KB ) - added by sakibmd 4 years ago.

Download all attachments as: .zip

Change History (9)

@patelmohip
4 years ago

patch added

#1 @jrf
4 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.

#2 @sakibmd
4 years ago

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

#3 @akmelias
4 years ago

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

#4 @SergeyBiryukov
4 years ago

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

#5 @SergeyBiryukov
4 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
4 years ago

  • Resolution → fixed
  • Status reviewing → 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
4 years ago

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