Make WordPress Core


Ignore:
Timestamp:
05/31/2019 02:13:09 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Correct operator precedence for an error code in WP_Ajax_Upgrader_Skin::error().

Props jrf.
Fixes #47441.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php

    r42761 r45487  
    9696            }
    9797
    98             // Count existing errors to generate an unique error code.
     98            // Count existing errors to generate a unique error code.
    9999            $errors_count = count( $this->errors->get_error_codes() );
    100             $this->errors->add( 'unknown_upgrade_error_' . $errors_count + 1, $string );
     100            $this->errors->add( 'unknown_upgrade_error_' . ( $errors_count + 1 ), $string );
    101101        } elseif ( is_wp_error( $errors ) ) {
    102102            foreach ( $errors->get_error_codes() as $error_code ) {
Note: See TracChangeset for help on using the changeset viewer.