Plugin Author
YOP
(@yourownprogrammer)
Hello
Please let us know what version of YOP Poll you are running.
Best
YOP Team
Hello, last version, it doesn’t shows me that there’s an update
More exactly, version is: 5.6
Thank you,
Thanatermesis
In fact the function “get_poll_options_by_id” seems like to only exist on this place, there’s no code referencing it… maybe its some old API?
I think that this problem is triggered when the cron is fetched
Plugin Author
YOP
(@yourownprogrammer)
Hello
I have included a fix to this problem below.
Also, it will be present in the next release.
Add the code below in models/yop_poll_model.php
public static function get_poll_options_by_id( $poll_id = 0 ) {
$poll_options = get_yop_poll_meta( $poll_id, 'options', true );
$default_options = get_option( 'yop_poll_options', false );
if( is_array( $default_options ) ) {
if( count( $default_options ) > 0 ) {
foreach( $default_options as $option_name => $option_value ) {
if( ! isset( $poll_options [$option_name] ) ) {
$poll_options [$option_name] = $option_value;
}
}
}
}
return $poll_options;
}
after
function get_bans_filter_search()
{
...
}
Best
YOP Team
I am getting the same error that started on 5 Feb 2015 and my version is 5.6:
[05-Feb-2015 01:00:07 UTC] PHP Fatal error: Call to undefined method Yop_Poll_Model::get_poll_options_by_id() in /home/wildblv0/public_html/wp-content/plugins/yop-poll/inc/public-admin.php on line 34
Has it been updated since 5.6?