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

Check for 'url' key existence before using #337

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Ruxton
Copy link
Contributor

@Ruxton Ruxton commented Sep 29, 2021

At this moment, there is a situation where cite only has 'name' key and nothing else.

Fixes:

Undefined index: url in wp-content/plugins/indieweb-post-kinds/templates/reply-metabox.php on line 20

At this moment, there is a situation where cite only has 'name' key and nothing else.

Fixes:
```
Undefined index: url in wp-content/plugins/indieweb-post-kinds/templates/reply-metabox.php on line 20
```
@dshanske
Copy link
Owner

@Ruxton the normalize_cite function was designed to always ensure there was a URL. I'd rather fix that.

@Ruxton
Copy link
Contributor Author

Ruxton commented Sep 29, 2021

@dshanske I saw that as normalize_cite gets called right after this block, but didn't push it through that function it because I notice we're potentially re-assigning the cite inside this block. Seemed a bit slow to normalize it only to potentially re-assign it and normalize it again.

@dshanske
Copy link
Owner

Good point. I just introduced it to try and solve the problem of a whole bunch of isset checks. Let me think on this one.

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.

None yet

2 participants