Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with creating accounts


larsba

Recommended Posts

Does anyone know why I get messages like the below when creating accounts the account does get created, but it does not look good for the clients.

 

 

 

Warning: reset(): Passed variable is not an array or object in D:\....pcshopping.be\includes\classes\email.php on line 71

 

Warning: Variable passed to each() is not an array or object in D:\....pcshopping.be\includes\classes\email.php on line 72

 

Fatal error: Call to a member function on a non-object in D:\....pcshopping.be\includes\functions\general.php on line 968

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

 

Lars Barasinski

Link to comment
Share on other sites

This is the section of the code that gives the first 2 errors:

 

/**

* Make sure the MIME version header is first.

*/

 

$this->headers[] = 'MIME-Version: 1.0';

 

reset($headers);

while (list(,$value) = each($headers)) {

if (tep_not_null($value)) {

$this->headers[] = $value;

}

}

}

 

 

the second error occurs in this section:

 

// Build the text version

$text = strip_tags($email_text);

if (EMAIL_USE_HTML == 'true') {

$message->add_html($email_text, $text);

} else {

$message->add_text($text);

}

 

Lars Barasinski

Link to comment
Share on other sites

Problem found in this forum - when the state field is removed from the customer creation the zone_id must be set to 0 - not false.

 

Code example taken from another post in this forum (create_account.php):

 

 

if (ACCOUNT_STATE == 'true') {

$state = tep_db_prepare_input($HTTP_POST_VARS['state']);

if (isset($HTTP_POST_VARS['zone_id'])) {

$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);

} else {

$zone_id = false;

}

} else { /*<=LINE 45, start of modification, add the following 2 lines*/

$zone_id = 0;

} /*<= end of modification*/

 

Lars Barasinski

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...