• Sometimes (but not everytime) the widget loads, I get this error:

    Notice: Undefined index: slideimageall in <path>/wp-content/plugins/wp-image-refresh/functions.php on line 146

    I have bracketed the code around that section of code as follows and have not seen the error recur (and the widget seems to work):

    
        if (isset($_SESSION['slideimageall'])) {    
     
        	if (count($_SESSION['slideimageall']) == 0) {
                $images = $wpdb->get_results("SELECT slideTitle,slideImage,slideText FROM $table_name ORDER BY rand()", OBJECT);
    
                //Hold complete Image array
                $_SESSION['slideimageall'] = array();
    
                foreach ($images as $images1) {
                    array_push($_SESSION['slideimageall'], array('slideImage' => $images1->slideImage, 'slideTitle' => $images1->slideTitle, 'slideText' => $images1->slideText));
                }
            }    
        }
    

    I don’t know what this will break. Is this a bug?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Undefined index: slideimageall’ is closed to new replies.