WP-PageNavi and WordPress 3.3.2 Error Fix

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /wp-content/plugins/wp-pagenavi/scb/Options.php on line 46

WP-PageNavi is a plugin which allows you to customize how your pagination is displayed – such as the older or newer post links with arrows on the bottom of this posting.

wp-pagenavi

If you’re using the latest version of WP-PageNavi 2.82 with WordPress 3.3.2, you may encounter an error, shown above. To apply the temporary fix until an update appears, go ahead an open up the file either through your FTP program or the WordPress plugin editor:

/wp-content/plugins/wp-pagenavi/scb/Options.php

Go down to line 46 and locate this code:

$data = array_merge( $this->defaults, $data );

Replace with this code:

$data = array_merge( $this->defaults, (array)$data );

Save, upload, and your error message will disappear!

If this doesn’t work, there is a chance your web hosting was setup when the server was using PHP4. 1and1 is one known web host this affects.

Since WP-PageNavi requires PHP5, add this line to your .htaccess file in your root WordPress directory:

AddHandler x-mapp-php5 .php

According to some further googling, it appears that placing (array) before $data ); first start appearing in WordPress 2.5. Any plugin or theme modified or created after this version may be affected by the error.

No comments yet.

Leave a Reply