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

serendipity_event_imageselectorplus: Undefined array key #850

Open
bauigel opened this issue Jul 17, 2024 · 1 comment
Open

serendipity_event_imageselectorplus: Undefined array key #850

bauigel opened this issue Jul 17, 2024 · 1 comment
Labels

Comments

@bauigel
Copy link

bauigel commented Jul 17, 2024

With current git-master I get an error

Warning: Undefined array key "ep_disable_markup_serendipity_event_imageselectorplus:34ba0343cf0d7f01a68354358af1be85" in /plugins/serendipity_event_imageselectorplus/serendipity_event_imageselectorplus.php on line 594.

Fix seems to be easy, there is just an isset missing. I changed the line from

!$eventData['properties']['ep_disable_markup_' . $this->instance] &&

to

!isset($eventData['properties']['ep_disable_markup_' . $this->instance]) &&
@onli onli added the bugs label Jul 18, 2024
@onli
Copy link
Member

onli commented Jul 18, 2024

The new check would only be false when $eventData['properties']['ep_disable_markup_' . $this->instance] is not set at all. But it would evaluate to true when $eventData['properties']['ep_disable_markup_' . $this->instance] is set, but set to false.

The correct check should be:

(!isset($eventData['properties']['ep_disable_markup_' . $this->instance]) || !$eventData['properties']['ep_disable_markup_' . $this->instance]) &&

Better to test it though, it's too easy to mix expressions like that up :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants