Skip to content

Commit

Permalink
fix: fix: Fixed an issue where deprecation errors would occur when an…
Browse files Browse the repository at this point in the history
… element does not have a `uri` ([#317](#317))
  • Loading branch information
khalwat committed Dec 9, 2024
1 parent 683bc73 commit ca26100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Retour.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function(Event $event) {
if (self::$settings->createUriChangeRedirects && $checkElementSlug) {
// Make sure this isn't a transitioning temporary draft/revision and that it's
// not propagating to other sites
if (!str_contains($element->uri, '__temp_')) {
if ($element->uri && !str_contains($element->uri, '__temp_')) {
Retour::$plugin->events->stashElementUris($element);
}
}
Expand Down

0 comments on commit ca26100

Please sign in to comment.