• Resolved bagofminds

    (@bagofminds)


    Hi

    At jetpack/modules/minileven/theme/pub/minileven/header.php at line 32 the call to array_shift() expects a reference (giving an error writ large on mobile web sites) when passed array_values().
    An easy fix is just to move the call to array_values() to a temporary variable before the call and pass the variable:
    ie:

    PROBLEM:
    $menu_id = array_shift( array_values( $location ) ); // access the ID of the…etc…

    SOLUTION:
    $locs = array_values( $location );
    $menu_id = array_shift( $locs ); // access the ID of the…etc…

    Regards

    Phil Basker

    https://wordpress.org/plugins/jetpack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Howdy,

    What version of PHP are you running and/or could you provide additional information for me to confirm the error?

    I wasn’t able to reproduce this when engaging the mobile theme. I’ve prepared a pull request on GitHub (currently waiting at https://github.com/kraftbj/Jetpack/tree/1919374 , but I’d like to be able to reproduce the error 🙂

    Cheers!

    Thread Starter bagofminds

    (@bagofminds)

    Hi Brandon

    I am running osx server 3.1.1 with php 5.4.24 zend 2.4.0
    The theme is the vanilla twenty fourteen theme
    Plugins akismet 3.0.0 codesnippetlibrary 1.1 jetpack 2.9.3 stat counter 1.6.6 ukcookieconsent 1.7.1

    I have just undone the fix on my site so if you go to https://www.bagofminds.com/wordpress you should see it on a mobile device (I am using an iphone)

    – phil

    Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Sounds good. I have 5.3 and 5.5 handy, so missing 5.4 to test it on.

    Pushed the PR to https://github.com/Automattic/jetpack/pull/552 for confirmation/merging.

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

The topic ‘header.php call by reference php error in mobile minileven jetpack theme’ is closed to new replies.