Jump to content


Replying to Php Error After Exchange Plugin Update


Post Options

  or Cancel


Topic Summary

Ray @sixfourweb

Posted 13 June 2014 - 03:59 PM

Thank you for the clarification.  Have a great weekend. Happy Father's Day.

Glenn Ansley

Posted 13 June 2014 - 03:29 PM

No template files were changed. The problem was in one of our API methods for the cart. I was using some syntax that PHP 5.3 didn't like. I just changed the syntax.

Ray @sixfourweb

Posted 13 June 2014 - 03:02 PM

Glen,

Thanks for the quick turnaround. Seems to be working just fine. Will the codex (http://ithemes.com/codex/page/Exchange_Template_Updates) be updated to reflect the recent changes?

Glenn Ansley

Posted 13 June 2014 - 12:06 PM

Hi Ray,
I'm sorry for the mistake! We've pushed 1.9.1. This should fix your problem.

Glenn

Ray @sixfourweb

Posted 13 June 2014 - 10:22 AM

After updating Exchange, I got the following error messages:


Parse error: syntax error, unexpected '[' in /home1/XXXXXX/public_html/wp-content/plugins/ithemes-exchange/api/cart.php on line 358

Warning: Cannot modify header information - headers already sent by (output started at /home1/XXXXXX/public_html/wp-content/plugins/ithemes-exchange/api/cart.php:358) in /home1/XXXXXX/public_html/wp-content/plugins/ithemes-exchange/lib/sessions/db_session_manager/class-db-session.php on line 129


If I rename the ithemes-exchange folder, the site comes up.  I tried installing a new copy of exchange from the WordPress repo, but the same error occurred and brought down the site.  The contents of the cart.php file are below.  Line 358 contains the following text : $current_session_id   = explode( '||', $current_session_string, 2 )[0];


This site is in production and is a fundraising site. Any quick help would be greatly appreciated

*** edited by moderator, removed huge chunk of code ***

<?php
/**
* This file contains functions intended for theme developers to interact with the active shopping cart plugin
*
* The active shopping cart plugin should add the needed hooks below within its codebase.
*
* @since 0.3.7
* @package IT_Exchange
*/
/**
* Returns an array of all data in the cart
*
* @since 0.3.7
* @return array
*/
function it_exchange_get_cart_data( $key = false ) {
$data = it_exchange_get_session_data( $key );
return apply_filters( 'it_exchange_get_cart_data', $data );
}


[...]

return apply_filters( 'it_exchange_get_cart_billing_address', $cart_billing );
}

Review the complete topic (launches new window)