Site icon Krum Cheshmedjiev

“Nivo Slider” v1.9 quick fix

"Nivo Slider" is a useful slideshow plugin, but version 1.9 introduced a bug that displays the following warning:

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /homepages/19/d395780486/htdocs/wp-content/plugins/nivo-slider/nivo-slider.php on line 1572

A quick workaround is to add the following line

if(!is_array($sources)) $sources = array($sources);

immediately before line 1572.

It may not be elegant, but it works. As the saying goes: "If it is stupid but it works, it is not stupid."

 

Exit mobile version