Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated notice #747

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

timotei-litespeed
Copy link
Contributor

Removing deprecated notice from this thread: https://wordpress.org/support/topic/php-deprecated-notice-14/

The fix is made to catch a case where the url cannot be parsed and returning null.

src/cdn.cls.php Outdated
@@ -311,7 +311,10 @@ private function _replace_inline_css()
$url = str_replace(array(' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '"', '''), '', $url);

// Parse file postfix
$postfix = '.' . pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION);
$parsed_url = parse_url($url, PHP_URL_PATH);
if(is_null($parsed_url)) continue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can just check if(!$parse_url)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@hi-hai hi-hai merged commit 99c228a into litespeedtech:v7.0 Sep 20, 2024
1 check failed
@hi-hai
Copy link
Collaborator

hi-hai commented Sep 20, 2024

Plz contact the user to confirm its fixed.

@timotei-litespeed timotei-litespeed deleted the CDN-Deprecated_notice branch September 20, 2024 18:08
hi-hai pushed a commit that referenced this pull request Sep 25, 2024
* Fix

* Review change

---------

Co-authored-by: Timotei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants