Skip to content

Conversation

@martinoak
Copy link
Contributor

@martinoak martinoak commented Aug 27, 2025

This PR repairs a possible null in parse_url() argument.

PHP Deprecated
parse_url(): Passing null to parameter # 1 ($url) of type string is deprecated

PHP Deprecated
parse_url(): Passing null to parameter #1 ($url) of type string is deprecated
@jasonvarga jasonvarga requested a review from Copilot August 27, 2025 14:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a PHP deprecation warning that occurs when parse_url() receives a null value, which is deprecated in newer PHP versions. The fix ensures that the referer header value defaults to an empty string when null.

  • Adds null coalescing operator to prevent null values from being passed to parse_url()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jasonvarga jasonvarga changed the title [5.x] Passing null to parameter #1 ($url) of type string is deprecated [5.x] Prevent null parse_url deprecation warning Aug 27, 2025
@jasonvarga jasonvarga merged commit 7eae461 into statamic:5.x Aug 27, 2025
26 checks passed
@edalzell
Copy link
Contributor

hahaha, lol, perhaps I should wake up before commenting.

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