WN

WN (https://www.wn.se/forum/index.php)
-   Serversidans teknologier (https://www.wn.se/forum/forumdisplay.php?f=4)
-   -   Problem med syntax error (https://www.wn.se/forum/showthread.php?t=31666)

xciso 2008-09-04 23:20

Tja. Håller på med en webshop (oscommerce) och håller på att installerar lite nya tillägg.
Har nu installerat SPPC (Separate price per customer)
Får nu ett syntax fel:
Parse error: syntax error, unexpected T_DEFAULT in /public_html/admin/customers.php on line 1337
Rad 1336 = break;
Rad 1337 = default:

Kod:

// BOF Separate Pricing Per Customer: dark grey field with customer name higher
 * * * *$heading[] = array('text' => ''. tep_draw_separator('pixel_trans.gif', '11', '12') .'<br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
// EOF Separate Pricing Per Customer
 * * *if (isset($cInfo->number_of_reviews) && ($cInfo->number_of_reviews) > 0) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews));
 * * *$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
 * * *break;
 * *default:
 * * *if (isset($cInfo) && is_object($cInfo)) {
 * * * *$heading[] = array('text' => '<b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');

 * * * *$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
 * * * *$contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created));
 * * * *$contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified));
 * * * *$contents[] = array('text' => '<br>' . TEXT_INFO_DATE_LAST_LOGON . ' ' *. tep_date_short($cInfo->date_last_logon));
 * * * *$contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
 * * * *$contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
 * * * *$contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
 * * *}
 * * *break;
 *}


Osiris 2008-09-05 01:17

Har inget tips, men är det inte lite lurt när det är rad 1337 som det är fel på :D

WebWatch 2008-09-05 07:12

Känns som du har en } för mycket... just den på rad 1337
(om inte det finns mer än den koden du visar... i så fall är det omöjligt att svara på.)

Magnus_A 2008-09-05 08:53

Det är klamringen det är fel på i närheten av felmeddelandet.

xciso 2008-09-05 10:31

Jag skrev inte ut hela filen, eftersom den är så stor. Givetvis kan jag göra det om det är bättre för någon som kanske kan förstå detta.
Vad är klamringen? Är det en sånhär: } ?

crazzy 2008-09-05 23:02

Öppna filen i en editor med syntax-highlightning så borde du se relativt kvickt vart felet är.

Och ja, klamrar aka måsvingar ser ut så här: {}


Alla tider är GMT +2. Klockan är nu 12:35.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson