• Resolved mayachen

    (@mayachen)


    I recently installed WPtouch on the site and got this error message.
    Warning: Invalid argument supplied for foreach() in /home/…/…/…/wp-content/plugins/gantry/functions.php on line 452

    Warning: Cannot modify header information – headers already sent by (output started at /home/…/…/…/wp-content/plugins/gantry/functions.php:452) in /home/…/…/…/wp-includes/pluggable.php on line 1178

    foreach ($gantry->_setbyurl as $queryvar) { (This is the line on 452)

    How do I resolve this problem?

    https://wordpress.org/plugins/gantry/

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

    (@gantry)

    Hi,

    We haven’t tested comptibility with WPTouch. Are you using a free version of WPTouch ?

    Thanks,
    Jakub

    Thread Starter mayachen

    (@mayachen)

    Yes

    Plugin Author Gantry

    (@gantry)

    Hi,

    I’m very sorry for the late reply. I was out of country and had limited connectivity.

    Please open functions.php and on line 452 change this code :

    foreach( $gantry->_setbyurl as $queryvar ) {
    	$aVars[] = $queryvar;
    }

    to this :

    if( $gantry !== null ) {
    	foreach( $gantry->_setbyurl as $queryvar ) {
    		$aVars[] = $queryvar;
    	}
    }

    I will include this in the next Gantry update.

    Thank you and one more time sorry!

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

The topic ‘Error with WPtouch’ is closed to new replies.