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

Removed some warnings clogging up the log file. #11

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

ronnymn
Copy link
Contributor

@ronnymn ronnymn commented Feb 25, 2016

Added empty array as default for get_option cuws_hide_admin_columns to
avoid warnings form subsequent in_array checks.

avoid warnings form subsequent in_array checks.
@senlin
Copy link
Owner

senlin commented Feb 26, 2016

Hi @ronnymn thanks for your pull request, can you please explain what it for exactly? I'm afraid I don't really understand.

@ronnymn
Copy link
Contributor Author

ronnymn commented Feb 26, 2016

Hi

I am currenty developing on a site where you plugin is active. In the
debug.log we were getting a lot of lines with warnings. So to eliminate the
problem I wrote a small change,
The problem was the get_option that returned false becaus no option was
set. So by giving it an emty array as default the in_array checks does not
give any warnings.

[25-Feb-2016 23:13:25 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 258
[25-Feb-2016 23:13:25 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 262
[25-Feb-2016 23:13:25 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 267
[25-Feb-2016 23:13:25 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 272
[25-Feb-2016 23:13:25 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 277
[25-Feb-2016 23:13:36 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 258
[25-Feb-2016 23:13:36 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 262
[25-Feb-2016 23:13:36 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 267
[25-Feb-2016 23:13:36 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 272
[25-Feb-2016 23:13:36 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 277
[25-Feb-2016 23:13:52 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 258
[25-Feb-2016 23:13:52 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 262
[25-Feb-2016 23:13:52 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 267
[25-Feb-2016 23:13:52 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 272
[25-Feb-2016 23:13:52 Europe/Oslo] PHP Warning: in_array() expects
parameter 2 to be array, boolean given in /home/pronav/www/
www.pronav.no/wp-content/plugins/so-clean-up-wp-seo/includes/class-so-clean-up-wp-seo.php
on line 277

Vennlig hilsen,

Ronny Myhre Njaastad

Systemutvikler

@senlin
Copy link
Owner

senlin commented Feb 26, 2016

Ah okay, I understand better now, thanks for your explanation. And for the PR of course, I will merge it now and release an updated version soon.

senlin added a commit that referenced this pull request Feb 26, 2016
Removed some warnings clogging up the log file.
@senlin senlin merged commit e72d4de into senlin:master Feb 26, 2016
@senlin
Copy link
Owner

senlin commented Feb 26, 2016

Ronny, may I ask, would you have any idea on how to solve issue #4 on Multisite Support. It already has gotten better than before, but perhaps it could be made even better? what do you think?

@ronnymn
Copy link
Contributor Author

ronnymn commented Feb 26, 2016

Just took a quick glance at it now. It would probably be a good thing if
you looped through the "_set_defaults" method for each individual site.

Vennlig hilsen,

Ronny Myhre Njaastad

Systemutvikler

ronny@maksimer.no
M. +47 900 66 303

[image: Beskrivelse: Maksimer Logo]
www.maksimer.no
www.twitter.com/maksimer

2016-02-26 11:36 GMT+01:00 Piet Bos notifications@github.com:

Ronny, may I ask, would you have any idea on how to solve issue #4
#4 on Multisite
Support. It already has gotten better than before, but perhaps it could be
made even better? what do you think?


Reply to this email directly or view it on GitHub
#11 (comment)
.

@senlin
Copy link
Owner

senlin commented Feb 26, 2016

Cool, thanks Ronny, I will look into that.

Cheers,
Piet
On February 26, 2016 at 19:08:23, Ronny Myhre Njaastad (notifications@github.com) wrote:

Just took a quick glance at it now. It would probably be a good thing if
you looped through the "_set_defaults" method for each individual site.

Vennlig hilsen,

Ronny Myhre Njaastad

Systemutvikler

ronny@maksimer.no
M. +47 900 66 303

[image: Beskrivelse: Maksimer Logo]
www.maksimer.no
www.twitter.com/maksimer

2016-02-26 11:36 GMT+01:00 Piet Bos notifications@github.com:

Ronny, may I ask, would you have any idea on how to solve issue #4
#4 on Multisite
Support. It already has gotten better than before, but perhaps it could be
made even better? what do you think?


Reply to this email directly or view it on GitHub
#11 (comment)
.


Reply to this email directly or view it on GitHub.

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.

2 participants