oik-plugins
WordPress plugins and themes

Fix for Warning: json_encode() expects exactly 1 parameter, 2 given

If you have installed oik-nivo-slider version 1.7 and oik version 1.17 AND are running your website on a version of PHP lower than 5.3.3, then you could get the following Warning message from the [nivo] shortcode.

Warning: json_encode() expects exactly 1 parameter, 2 given in /wp-content/plugins/oik/bobbfunc.inc on line

This post offers three solutions.

Not recommended
Fix the code yourself. Not recommended - but it was the first solution given in the forum
Proposed solution
Install the latest version of oik, using the oik options > Plugins admin pages.

See Upgrade to a new version of oik from oik-plugins

Longer term
Upgrade your version of PHP to 5.3.3 or higher.

This is the best long term solution as this will allow the oik base plugin to use the functionality implemented in PHP 5.3.3 for the json_encode() API

2 Responses to Fix for Warning: json_encode() expects exactly 1 parameter, 2 given

Leave a Reply

Information
Recent plugin updates
oik-batchmove v2.4 Now supports mass setting of post meta data. ...
oik-squeeze v0.7 v0.7 of the oik-squeeze WordPress plugin no longer displays the squeeze page form on the WPMS sign-up page. ...
oik-external-link-warning v0.05 v0.05 of the oik-external-link-warning plugin now supports display of tooltips over links which do not contain the title attribute. ...
DIY-oik v1.4 DIY-oik v1.4 now has better support for Add-To-Any and similar plugins that add share buttons or other content during shortcode expansion. ...
oik v2.4 oik version 2.4 was released to WordPress.org on Christmas Eve, 2014.  ...