Plugin Directory

Changeset 2339327


Ignore:
Timestamp:
07/12/2020 04:35:30 PM (6 years ago)
Author:
gsayed786
Message:

Fix the file loading on windows

Location:
headless-cms/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • headless-cms/trunk/headless-cms.php

    r2334762 r2339327  
    88 * License:     GPL2
    99 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10  * Version:     1.0.2
     10 * Version:     1.0.3
    1111 * Text Domain: headless-cms
    1212 *
  • headless-cms/trunk/inc/helpers/autoloader.php

    r2333730 r2339327  
    7878    }
    7979
    80     if ( ! empty( $resource_path ) && file_exists( $resource_path ) && 0 === validate_file( $resource_path ) ) {
     80    /**
     81     * If $is_valid_file has 0 means valid path or 2 means the file path contains a Windows drive path.
     82     */
     83    $is_valid_file = validate_file( $resource_path );
     84
     85    if ( ! empty( $resource_path ) && file_exists( $resource_path ) && ( 0 === $is_valid_file || 2 === $is_valid_file ) ) {
    8186        // We already making sure that file is exists and valid.
    8287        require_once( $resource_path ); // phpcs:ignore
Note: See TracChangeset for help on using the changeset viewer.