osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Heavy problems with passed variable and member function

This is a discussion on Heavy problems with passed variable and member function within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; Hello osCdox Forum, I set up a new shop and now some things don't work. I really don't know why. ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Installation Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 09-14-2003, 01:41 PM
Lurker
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Markus
Default Heavy problems with passed variable and member function

Hello osCdox Forum,

I set up a new shop and now some things don't work. I really don't know why.
Maybe someone could help, this would be really great.

Thanks in advance
Markus

If a new customer registers then the following warnings appear:

error message:
Quote:
Warning: reset() [function.reset]: Passed variable is not an array or object in /www/htdocs/karaoke/catalog/includes/classes/email.php on line 71

Warning: Variable passed to each() is not an array or object in /www/htdocs/karaoke/catalog/includes/classes/email.php on line 72

Fatal error: Call to a member function on a non-object in /www/htdocs/karaoke/catalog/includes/functions/general.php on line 971

So I tried toi find something about it, but didn't know what to do. Honestly I'm not that good in PHP and SQL.


email.php @ Lines 20 - 77:
Quote:
class email {
var $html;
var $text;
var $output;
var $html_text;
var $html_images;
var $image_types;
var $build_params;
var $attachments;
var $headers;

function email($headers = '') {
if ($headers == '') $headers = array();

$this->html_images = array();
$this->headers = array();

if (EMAIL_LINEFEED == 'CRLF') {
$this->lf = "\r\n";
} else {
$this->lf = "\n";
}

/**
* If you want the auto load functionality
* to find other mime-image/file types, add the
* extension and content type here.
*/

$this->image_types = array('gif' => 'image/gif',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'bmp' => 'image/bmp',
'png' => 'image/png',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'swf' => 'application/x-shockwave-flash');

$this->build_params['html_encoding'] = 'quoted-printable';
$this->build_params['text_encoding'] = '7bit';
$this->build_params['html_charset'] = constant('CHARSET');
$this->build_params['text_charset'] = constant('CHARSET');
$this->build_params['text_wrap'] = 998;

/**
* 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;
}
}
}

And, general.php, Lines 962 - 979:
Quote:
function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
if (SEND_EMAILS != 'true') return false;

// Instantiate a new mail object
$message = new email(array('X-Mailer: osCommerce Mailer'));

// 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);
}

// Send message
$message->build_message();
$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 09-14-2003, 02:06 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

What are your server specs?
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-15-2003, 06:24 AM
Lurker
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Markus
Default

This solves the bug...
http://forums.oscommerce.com/index.p...p;#entry229803
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
PayPal error "Call to a member function on a non-object brendanl79 osCMax v2 Customization/Mods 13 06-29-2007 12:20 PM
PayPal error "Call to a member function on a non-object brendanl79 osCMax v2 Features Discussion 1 10-12-2006 09:12 PM
CVV - full value not being passed through betagirl osCMax v2 Installation issues 0 09-12-2006 08:09 AM
Problems removing Review function InfernoX osCMax v2 Customization/Mods 5 10-27-2005 01:56 PM
What is passed to constructor of tableBox ? ($contents) raj osCommerce 2.2 Modification Help 0 04-09-2004 01:03 AM


All times are GMT -8. The time now is 07:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax