Hi @wvega, nice catch indeed! Your solution is effective solution for the issue.
Meanwhile I rewrote the plugin code and used a little bit different approach which should mitigate the issue as well. So feel free to update CMP plugin anytime it gets udpated 🙂
Alex
Hello Alex,
I use the latest version 2.8.4 and I also have error messages in the niteo-cmp.php and cmp-settings.php
What could be the cause here?
I turned off all plugins.
My Wordtpress Version 4.9.8 with Avada Theme.
Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/…/wp-content/plugins/cmp-coming-soon-maintenance/niteo-cmp.php on line 198
Warning: in_array() expects parameter 2 to be array, null given in /home/…/wp-content/plugins/cmp-coming-soon-maintenance/niteo-cmp.php on line 800 and 789
Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/…/wp-content/plugins/cmp-coming-soon-maintenance/niteo-cmp.php on line 198 and 208
Warning: array_search() expects parameter 2 to be array, null given in /home/…/wp-content/plugins/cmp-coming-soon-maintenance/cmp-settings.php on line 540
Warning: Invalid argument supplied for foreach() in /home/…/wp-content/plugins/cmp-coming-soon-maintenance/cmp-settings.php on line 553
Best regards
Dan
-
This reply was modified 7 years, 7 months ago by
webboxone.
Hello @webboxone – Dan, those PHP warnings are caused by different behaviour of your PHP version – technically CMP expects to have empty array if no premium themes are installed but null was given in your case.
I made a small changes and will release update 2.8.5 soon, which should resolve those warnings!
thanks Alex
Great, many thanks.
Best regards Dan