Make WordPress Core

Changeset 53316


Ignore:
Timestamp:
04/29/2022 07:15:57 PM (3 years ago)
Author:
johnbillion
Message:

Docs: Corrections and improvements to docblocks for function and hooks relating to fatal error handling.

See #54729

Location:
trunk/src/wp-includes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-fatal-error-handler.php

    r51076 r53316  
    6767     * @since 5.2.0
    6868     *
    69      * @return array|null Error that was triggered, or null if no error received or if the error should not be handled.
     69     * @return array|null Error information returned by `error_get_last()`, or null
     70     *                    if none was recorded or the error should not be handled.
    7071     */
    7172    protected function detect_error() {
     
    9192     * @since 5.2.0
    9293     *
    93      * @param array $error Error information retrieved from error_get_last().
     94     * @param array $error Error information retrieved from `error_get_last()`.
    9495     * @return bool Whether WordPress should handle this error.
    9596     */
     
    117118         *
    118119         * @param bool  $should_handle_error Whether the error should be handled by the fatal error handler.
    119          * @param array $error               Error information retrieved from error_get_last().
     120         * @param array $error               Error information retrieved from `error_get_last()`.
    120121         */
    121122        return (bool) apply_filters( 'wp_should_handle_php_error', false, $error );
  • trunk/src/wp-includes/class-wp-paused-extensions-storage.php

    r48102 r53316  
    4343     * @param string $extension Plugin or theme directory name.
    4444     * @param array  $error     {
    45      *     Error that was triggered.
    46      *
    47      *     @type string $type    The error type.
     45     *     Error information returned by `error_get_last()`.
     46     *
     47     *     @type int    $type    The error type.
    4848     *     @type string $file    The name of the file in which the error occurred.
    49      *     @type string $line    The line number in which the error occurred.
     49     *     @type int    $line    The line number in which the error occurred.
    5050     *     @type string $message The error message.
    5151     * }
     
    142142     * @since 5.2.0
    143143     *
    144      * @return array Associative array of extension slugs to the error recorded.
     144     * @return array {
     145     *     Associative array of errors keyed by extension slug.
     146     *
     147     *     @type array ...$0 Error information returned by `error_get_last()`.
     148     * }
    145149     */
    146150    public function get_all() {
  • trunk/src/wp-includes/class-wp-recovery-mode-email-service.php

    r52580 r53316  
    4141     *
    4242     * @param int   $rate_limit Number of seconds before another email can be sent.
    43      * @param array $error      Error details from {@see error_get_last()}
     43     * @param array $error      Error details from `error_get_last()`.
    4444     * @param array $extension {
    4545     *     The extension that caused the error.
     
    102102     *
    103103     * @param int   $rate_limit Number of seconds before another email can be sent.
    104      * @param array $error      Error details from {@see error_get_last()}
    105      * @param array $extension  Extension that caused the error.
     104     * @param array $error      Error details from `error_get_last()`.
     105     * @param array $extension {
     106     *     The extension that caused the error.
     107     *
     108     *     @type string $slug The extension slug. The directory of the plugin or theme.
     109     *     @type string $type The extension type. Either 'plugin' or 'theme'.
     110     * }
    106111     * @return bool Whether the email was sent successfully.
    107112     */
     
    257262     * @since 5.2.0
    258263     *
    259      * @param array $extension The extension that caused the error.
     264     * @param array $extension {
     265     *     The extension that caused the error.
     266     *
     267     *     @type string $slug The extension slug. The directory of the plugin or theme.
     268     *     @type string $type The extension type. Either 'plugin' or 'theme'.
     269     * }
    260270     * @return string Message about which extension caused the error.
    261271     */
     
    289299     * @since 5.3.0
    290300     *
    291      * @param array $extension The extension that caused the error.
     301     * @param array $extension {
     302     *     The extension that caused the error.
     303     *
     304     *     @type string $slug The extension slug. The directory of the plugin or theme.
     305     *     @type string $type The extension type. Either 'plugin' or 'theme'.
     306     * }
    292307     * @return array|false A plugin array {@see get_plugins()} or `false` if no plugin was found.
    293308     */
     
    318333     * @since 5.3.0
    319334     *
    320      * @param array $extension The extension that caused the error.
     335     * @param array $extension {
     336     *     The extension that caused the error.
     337     *
     338     *     @type string $slug The extension slug. The directory of the plugin or theme.
     339     *     @type string $type The extension type. Either 'plugin' or 'theme'.
     340     * }
    321341     * @return array An associative array of debug information.
    322342     */
  • trunk/src/wp-includes/class-wp-recovery-mode.php

    r48782 r53316  
    160160     * @since 5.2.0
    161161     *
    162      * @param array $error Error details from {@see error_get_last()}
     162     * @param array $error Error details from `error_get_last()`.
    163163     * @return true|WP_Error True if the error was handled and headers have already been sent.
    164164     *                       Or the request will exit to try and catch multiple errors at once.
     
    340340     * @global array $wp_theme_directories
    341341     *
    342      * @param array $error Error that was triggered.
     342     * @param array $error Error details from `error_get_last()`.
    343343     * @return array|false {
    344344     *     Extension details.
     
    426426     * @since 5.2.0
    427427     *
    428      * @param array $error Error that was triggered.
     428     * @param array $error Error details from `error_get_last()`.
    429429     * @return bool True if the error was stored successfully, false otherwise.
    430430     */
  • trunk/src/wp-includes/customize/class-wp-customize-selective-refresh.php

    r51518 r53316  
    282282     * @param string $errstr  Error string.
    283283     * @param string $errfile Error file.
    284      * @param string $errline Error line.
     284     * @param int    $errline Error line.
    285285     * @return true Always true.
    286286     */
  • trunk/src/wp-includes/error-protection.php

    r49489 r53316  
    4242 * @since 5.2.0
    4343 *
    44  * @param array $error Error details {@see error_get_last()}
     44 * @param array $error Error details from `error_get_last()`.
    4545 * @return string Formatted error description.
    4646 */
Note: See TracChangeset for help on using the changeset viewer.