• Resolved kylethebaker

    (@kylethebaker)


    Notice: Only variables should be passed by reference in /home/kyle/apps/wp/public/content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_singlepic/package.module.nextgen_basic_singlepic.php on line 38

    Since array_shift expects a reference it requires that a bound variable be passed. The following code:

    $image = array_shift($displayed_gallery->get_entities(1, FALSE, FALSE, 'included'));

    Needs to instead be something like:

    $gallery_entities = $displayed_gallery->get_entities(1, FALSE, FALSE, 'included');
    $image = array_shift($gallery_items);

    Alternatively, since array_shift is just being used to get the first item, it could instead be $image = $gallery_entities[0], or even something like $image = $displayed_gallery->get_entities(....)[0] though that might not work on older versions of php.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Notice being thrown in nextgen_basic_singlepic module (with fix)’ is closed to new replies.