• Getting array slice error.

    added echos and uncommented debug statements in fw-vimeo-videowall/fw-vimeo-videowall.class.php

    ` public function get_datas() {

    echo $this->api_endpoint;
    echo ” end of api_endopoint \n “;

    $endpoint_req = wp_remote_retrieve_body( wp_remote_get($this->api_endpoint));

    echo wp_remote_retrieve_body( wp_remote_get($this->api_endpoint));
    echo ” END OF wp_remote_retrieve_body \n “;

    echo $endpoint_req;
    echo ” end of endpoint Request \n “;

    $videos = json_decode($endpoint_req );

    print_r($videos);
    echo ” end of $videos \n “;

    $video_details = array();

    //$nb = $this->vsource == ‘video’ ? 1 : $this->vperpage;
    //$this->vnumber = $this->vnumber == 0 ? $nb : $this->vnumber;
    if ($this->vnumber != false ) {

    /* for ($i=0; $i < $this->vperpage; $i++) {
    if ($i == $nb) { break; }
    $videos_details [] = $videos[$i];

    }*/

    if ($this->vnumber <= 20) {

    echo ‘vnumber = ‘, $this->vnumber, “\n”, ‘videos = ‘, $videos, “\n”;

    $videos = array_slice($videos,0, $this->vnumber);
    }

    $i=0;
    do {
    $videos_details [] = $videos[$i];
    $i++;
    }
    while (isset($videos[$i]));
    }
    return $videos_details;
    }
    }`

    Output is:

    https://vimeo.com/api/v2/channel/eyeonbethel/videos.json?page=1 end of api_endopoint END OF wp_remote_retrieve_body end of endpoint Request end of vnumber = 3 videos =
    Warning: array_slice() expects parameter 1 to be array, null given in <path to root>/html/bethelRepublicansWP/wp-content/plugins/fw-vimeo-videowall/fw-vimeo-videowall.class.php on line 480

    Taking the widget off because it looks bad on a production site.

    Tried removing and resinstalling fw_vimeo_videowall, no change.

    https://www.ads-software.com/extend/plugins/fw-vimeo-videowall/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: fw-vimeo-videowall] array_slice() expects parameter 1 to be array’ is closed to new replies.