Skip to content

DIRECTORY_SEPARATOR breaks resource URL path #75

@brainfork

Description

@brainfork

Use of the DIRECTORY_SEPARATOR constant here:

$src = trailingslashit( get_option( 'home' ) . DIRECTORY_SEPARATOR . self::$options['endpoint'] );
is causing the path to a minified resource to be returned as https://HOME_URL\_minify/RESOURCE_PATH. It's also not necessary as per the discussion here: https://stackoverflow.com/questions/26881333/when-to-use-directory-separator-in-php-code/26881417#comment90090608_26881417

I recommend updating the line to:
$src = trailingslashit( get_option( 'home' ) . '/' . self::$options['endpoint'] );
or
$src = trailingslashit( trailingslashit( get_option( 'home' ) ) . self::$options['endpoint'] );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions