Make WordPress Core

Ticket #59987: 59987.patch

File 59987.patch, 879 bytes (added by TobiasBg, 14 months ago)

Add missing port number to postMessage call.

  • src/wp-admin/includes/class-wp-upgrader-skin.php

    diff --git src/wp-admin/includes/class-wp-upgrader-skin.php src/wp-admin/includes/class-wp-upgrader-skin.php
    index 598724f..a40660e 100644
    class WP_Upgrader_Skin { 
    240240                if ( defined( 'IFRAME_REQUEST' ) ) {
    241241                        echo '<script type="text/javascript">
    242242                                        if ( window.postMessage && JSON ) {
    243                                                 window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname );
     243                                                window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname + ( "" !== window.location.port ? ":" + window.location.port : "" ) );
    244244                                        }
    245245                                </script>';
    246246                } else {