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

Undefined index: tags_as_class #227

Closed
sewid opened this Issue Jan 17, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@sewid

sewid commented Jan 17, 2017

Hi there,

when using the plugins widget, I get this notification when WP_DEBUG is enabled:

Undefined index: tags_as_class in /X/Y/Z/wp-content/plugins/list-category-posts/include/lcp-catlistdisplayer.php on line 243

Best regards,
Sebastian

@vacuus vacuus referenced this issue Jan 18, 2017

Merged

Iss227 #228

@vacuus

This comment has been minimized.

Show comment
Hide comment
@vacuus

vacuus Jan 18, 2017

Contributor

Thanks for reporting this! I should have caught this when I submitted my earlier PR ( #218 ). I can probably write a test to check for these kinds of errors/warnings.

I submitted a pull request to fix this here: #228 .

Contributor

vacuus commented Jan 18, 2017

Thanks for reporting this! I should have caught this when I submitted my earlier PR ( #218 ). I can probably write a test to check for these kinds of errors/warnings.

I submitted a pull request to fix this here: #228 .

@picandocodigo

This comment has been minimized.

Show comment
Hide comment
@picandocodigo

picandocodigo Jan 30, 2017

Owner

Sorry for the delay in accepting the PR. The plugin's being updated on WordPress.org's svn server as I'm writing this. Version 0.71.1 should be up in a few minutes and fix this. Thanks @vacuus!!!

Owner

picandocodigo commented Jan 30, 2017

Sorry for the delay in accepting the PR. The plugin's being updated on WordPress.org's svn server as I'm writing this. Version 0.71.1 should be up in a few minutes and fix this. Thanks @vacuus!!!

@hhenshaw

This comment has been minimized.

Show comment
Hide comment
@hhenshaw

hhenshaw Feb 2, 2017

I'm running 0.71.1 and am getting the following: Notice: Undefined index: tags_as_class in /X/wp-content/plugins/list-category-posts/include/lcp-widget.php on line 40.

hhenshaw commented Feb 2, 2017

I'm running 0.71.1 and am getting the following: Notice: Undefined index: tags_as_class in /X/wp-content/plugins/list-category-posts/include/lcp-widget.php on line 40.

@lucadima15

This comment has been minimized.

Show comment
Hide comment
@lucadima15

lucadima15 Feb 17, 2017

By now I've solved substituting this row:

$tags_as_class = ($instance['tags_as_class'] == 'yes') ? 'yes' : 'no';

with these:

if(array_key_exists('tags_as_class', $instance))
{
$tags_as_class = ($instance['tags_as_class'] == 'yes') ? 'yes' : 'no';
}
else
{
$tags_as_class = '';
}

lucadima15 commented Feb 17, 2017

By now I've solved substituting this row:

$tags_as_class = ($instance['tags_as_class'] == 'yes') ? 'yes' : 'no';

with these:

if(array_key_exists('tags_as_class', $instance))
{
$tags_as_class = ($instance['tags_as_class'] == 'yes') ? 'yes' : 'no';
}
else
{
$tags_as_class = '';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment