Support » Plugin: Jetpack by WordPress.com » header.php call by reference php error in mobile minileven jetpack theme

  • 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)
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.