Make WordPress Core


Ignore:
Timestamp:
08/07/2020 01:41:55 PM (4 years ago)
Author:
desrosj
Message:

Site Health: Check if session_status() exists before calling it.

Merges [48742] to the 5.5 branch.
Reviewed by desrosj, SergeyBiryukov.
Props bgermann.
Fixes #50862.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/file.php

    r48657 r48746  
    556556        }
    557557
    558         if ( PHP_SESSION_ACTIVE === session_status() ) {
     558        if ( function_exists( 'session_status' ) && PHP_SESSION_ACTIVE === session_status() ) {
    559559            // Close any active session to prevent HTTP requests from timing out
    560560            // when attempting to connect back to the site.
Note: See TracChangeset for help on using the changeset viewer.