Thread Starter
azn137
(@azn137)
Looks like the previous version didn’t overload this function, and this one just borked it. Here’s the offending function:
function get_option( $option = null ) {
$options = get_option( 'yarpp' );
// ensure defaults if not set:
$options = array_merge( $this->default_options, $options );
// some extra work is required for arrays:
foreach ( $this->default_options as $key => $default ) {
if ( !is_array($default) )
continue;
$options[$key] = array_merge( $this->default_options[$key], $options[$key] );
}
if ( !isset($options['weight']['tax']) )
$options['weight']['tax'] = $this->default_options['weight']['tax'];
if ( is_null( $option ) )
return $options;
$optionpath = array();
$parsed_option = array();
wp_parse_str($option, $parsed_option);
$optionpath = $this->array_flatten($parsed_option);
$current = $options;
foreach ( $optionpath as $optionpart ) {
if ( !is_array($current) || !isset($current[$optionpart]) )
return null;
$current = $current[$optionpart];
}
return $current;
}
What happens if you change line 139 to be
$options = (array) get_option( 'yarpp', array() );
?
Thanks mitcho. That did the trick for me.
I pushed this hotfix to the 3.4 tag… hopefully ww.wp.xz.cn will repackage it quickly.
how will we know if it has been fixed? an upgrade notification?
The zip archive has been updated. Just download again and replace your files:
http://downloads.wp.xz.cn/plugin/yet-another-related-posts-plugin.3.4.zip
Thanks for the quick report!
thanks! where are the previous settings on the plugin? like the accuracy for related posts
Thread Starter
azn137
(@azn137)
That zip did the trick for me. Thanks.
saw it already, screen options
why is it that there are no related posts being displayed?
another error i noticed:
when you check the SHOW excerpt this message appears on the textbox
<b>Warning</b>: array_merge() [function.array-merge]: Argument #2 is not an array in <b>/home/mysite/public_html/v2/wp-content/plugins/yet-another-related-posts-plugin/class-core.php</b> on line <b>146</b>
<small>
@jlapitan you’ll want to replace your files with the new 3.4 zip.