Jump to content
Sign in to follow this  
iflyamphib

Parse error: syntax error?

Recommended Posts

Installed Fedex Direct 2.07 this morning. Everything went well. I do pull rates on the checkout page from Fedex, so no problems there.

 

I have two stores: One I use simply for testing code, and the other one is the 'real' store (yet both are live). Once I verify code works on the dummy store, I then follow the same install on the live store.

 

After install to the dummy and live store, I later logged in to the dummy store and clicked on the Catalog link. I then receive an error message:

 

Parse error: syntax error, unexpected ';', expecting ')' in /home/recmob/public_html/admin/categories.php on line 404

 

The code around that (lines 385 through 416) is:

 

<?php

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_price' => '',

'products_weight' => '',

'products_date_added' => '',

'products_last_modified' => '',

'products_date_available' => '',

'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => '',

'products_ship_sep' =>

 

( NOTE This is line 404 in my editor) $pInfo = new objectInfo($parameters);

 

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id , p.products_ship_sep from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

 

$pInfo->objectInfo($product);

} elseif (tep_not_null($HTTP_POST_VARS)) {

$pInfo->objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

}

 

 

I am not a coder by any means and have been working on this for several hours. I then uploaded stock osc code for this page and error disappears. I then modded the file again according to the directions and the same error appears. Also, the error occurs on BOTH the test store and the live store.

 

Any suggestions? Jim

Share this post


Link to post
Share on other sites

Got it fixed. Guess I just needed a break. Not knowing php at all and looking at similar code in the file helped :)

 

Why is the array statement cut off?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×