Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2007
    Location
    Miami, FL
    Posts
    29
    Plugin Contributions
    0

    help question Parse error question

    Help, I'm PHP illiterate and I'm getting the following error when going to the Customers tab in admin:

    Parse error: syntax error, unexpected T_CASE in /admin/customers.php on line 267


    This is line 267:

    case 'deleteconfirm':


    For convenience I'm also copying a few lines above and below:
    Code:
            } else if ($error == true) {
              $cInfo = new objectInfo($_POST);
              $processed = true;
            }
    
            break;
          case 'deleteconfirm':
            // demo active test
            if (zen_admin_demo()) {
              $_GET['action']= '';
              $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
              zen_redirect(zen_href_link(FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID', 'action')), 'NONSSL'));
            }
    I'm using version 1.3.7.1.

    Thanks in advance for any assistance

  2. #2
    Join Date
    Sep 2007
    Posts
    219
    Plugin Contributions
    0

    Idea or Suggestion Re: Parse error question

    Hi Bandora,

    What changes have you made to this page? The code you have shown is correct so I am guessing there is some code before this that is causing the issue.


  3. #3
    Join Date
    Oct 2007
    Location
    Miami, FL
    Posts
    29
    Plugin Contributions
    0

    Default Re: Parse error question

    The only change from the original file was the newsletter subscribe mod code below:
    Code:
    // BEGIN newsletter_subscribe mod 1/3
    	  $check_email_count = $check_email->RecordCount();
    
    	if(defined('NEWSONLY_SUBSCRIPTION_ENABLED') &&
    	   (NEWSONLY_SUBSCRIPTION_ENABLED=='true')) {
    // dmcl1 -- adding a check of the SUBSCRIBERS table
    	  $check_subscribers = $db->Execute("SELECT email_address FROM " . TABLE_SUBSCRIBERS . "
    	  									WHERE email_address = '" . $customers_email_address . "'
    										AND customers_id != '" . (int)$customers_id . "' ");
    	  $check_email_count += $check_subscribers->RecordCount();
    	}
    
        if ($check_email_count > 0) {
    // END newsletter_subscribe mod 1/3

    Everything was working fine after installing the mod, it stopped working later.

    I used beyond compare to confirm that these lines are the only changes from the original files.

  4. #4
    Join Date
    Sep 2007
    Posts
    219
    Plugin Contributions
    0

    Default Re: Parse error question

    Hi Bandora,

    I have never used that mod, but if you say it worked after installing it then I would hazard a guess that maybe the mod isn't the problem. Is this the last mod you have made? Is there anything else you have done since?

    I did download the mod to have a nose through, but nothing in paticular hit me as being wrong.


  5. #5
    Join Date
    Oct 2007
    Location
    Miami, FL
    Posts
    29
    Plugin Contributions
    0

    Default Re: Parse error question

    Greetings RuFus, thank you for your assistance.

    Since then the only thing that I have done was try to install the Edit Orders contribution but that mod didn't require a change of customers.php

  6. #6
    Join Date
    Sep 2007
    Posts
    219
    Plugin Contributions
    0

    Default Re: Parse error question

    Hi Bandora,

    On looking again, there should be two more additions in customer.php for this mod? Have you included those as well?

    Line 263 - 290 Newsletter_Subscribe mod 2/3
    Line 346 - 353 Newsletter_Subscribe mod 3/3

  7. #7
    Join Date
    Oct 2007
    Location
    Miami, FL
    Posts
    29
    Plugin Contributions
    0

    Default Re: Parse error question

    Interesting, I just checked and those parts were missing.

    I pulled the original file and re uploaded it and it works now!

    Thank you so much! I wouldn't have noticed the missing code on my own

  8. #8
    Join Date
    Sep 2007
    Posts
    219
    Plugin Contributions
    0

    Default Re: Parse error question

    Well we got there in the end, I am just happy your admin is now fixed


 

 

Similar Threads

  1. parse error question
    By spec in forum General Questions
    Replies: 1
    Last Post: 18 Apr 2010, 01:13 AM
  2. PHP Parse error: parse error, unexpected T_STRING
    By awesomo in forum General Questions
    Replies: 9
    Last Post: 6 Sep 2008, 01:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg