Graphene Version 2.5.1 and Jetpack

  • Mywebapps

    #49972

    Hi,

    I’ve just upgraded my website to Graphene 2.5.1 and immediately encountered the following error message on the homepage slider, even with the Jetpack Photon functonality turned off:

    Warning: trim() expects parameter 1 to be string, array given in /home/beitemco/public_html/wp-content/plugins/jetpack/functions.photon.php on line 13

    This was not an issue with Version 2.4.3.1 and Jetpack. The error goes away if I deactivate Jetpack completely.

    Your assistance is getting to the bottom of this would be much appreciated.

    Admin

    Syahir Hakim

    #49975

    Thanks for reporting the issue. We’ve fixed the issue and will include it in the next update.

    If you would like to test it out, in the file graphene/inc/slider.php, replace the following lines 72 – 80:

    /* Background image*/
    if ( $display == 'bgimage-excerpt' || $display == 'banner' ) {
    	$image = apply_filters( 'jetpack_photon_url', graphene_get_slider_image( get_the_ID(), 'graphene_slider', true ) );
    	if ( $image ){
    		$style .= 'style="background-image:url(';
    		$style .= ( is_array( $image ) ) ? $image[0] : $image;
    		$style .= ');"';
    	}
    }
    

    with this code:

    /* Background image*/
    if ( $display == 'bgimage-excerpt' || $display == 'banner' ) {
    	$image = graphene_get_slider_image( get_the_ID(), 'graphene_slider', true );
    	if ( $image ){
    		if ( is_array( $image ) ) $image = $image[0];
    		$style .= 'style="background-image:url(';
    		$style .= apply_filters( 'jetpack_photon_url', $image );
    		$style .= ');"';
    	}
    }
    

    Mywebapps

    #49976

    Thanks, much appreciated!

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

  • You must be logged in to reply to this topic.