• Resolved peterzarubin

    (@peterzarubin)


    Found in the log db such error

    peter-zarubin.ru [Sat Apr 29 11:59:28 2017] [error] [client 37.195.67.92] PHP Notice: Undefined offset: 1 in /public_html/wp-content/plugins/easy-social-share-buttons3/public/get-noapi-counts.php on line 92, referer: https://peter-zarubin.ru/articles/

    the code is

    `function get_counter_number_odnoklassniki( $url ) {
    $CHECK_URL_PREFIX = ‘https://www.odnoklassniki.ru/dk?st.cmd=extLike&uid=odklcnt0&ref=’;

    $check_url = $CHECK_URL_PREFIX . $url;

    $data = parse( $check_url );
    $shares = array();

    //print $check_url . ‘ = ‘ .$data;
    preg_match( ‘/^ODKL\.updateCount\(\’odklcnt0\’,\'(\d+)\’\);$/i’, $data, $shares );

    return (int)$shares[ 1 ];
    }`

    row 92 is
    return (int)$shares[ 1 ];

    How to fix it?

Viewing 1 replies (of 1 total)
  • Plugin Author Idiom

    (@brianbrey)

    Hi, I’m sorry but I that is not our plugin. Are you sure you are in the right support forum? Our plugin does not have a file named get-noapi-counts.php.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice: Undefined offset: 1’ is closed to new replies.